implement sa_from_sp_baltic#95
Conversation
|
Hi @DocOtak ! Thanks for your contribution! Good questions. No, it is not just translate to Rust. We shall keep the signature of the public functions. And we shall provide the same results, but if make sense we can use features to decide the behavior. For instance, the I agree on how you used Since those two functions require will require some support local functions plus all the related tests, I was wondering about moving those to a sub-module and then export the public one to Yes, we could use a custom type Thank you!! |
This is my first attempt ever at contributing to a rust project so, it's probably going to be rough. I also realize there are no doc strings yet and this potentially conflicts with #92 but wanted to "dip my toe in" to use the idiom.
Some questions/thoughts I had while doing this in no real order:
in_balticfunction is not in the C version, but is duplicated in bothsa_from_sp_balticandsp_from_sa_balticsa_from_sp_baltic(andsp_from_sa_baltic) do not appear to be public interface for gsw, the higher levelsp_from_saandsa_from_spcall the *_baltic functions internally, check to see if they return anything valid and if not, do the SAAR lookup/conversion.util_xinterp1, forces a compile time check that the two array sizes are the same which is nice, theutil_indxcannot enforce a "2 or more" constraint untilgeneric_const_exprsis stable.