-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove American spellings from prefixes and units (deka, meter, liter) #327
Comments
I don't think we want to be supporting multiple spellings of a single prefix. We should go with the standard |
Totally agree. |
I don't understand why we can't have both? One could be the proper one, the other a pointer/alias/synonym. No harm done? What is the rationale for not having both? Why not Deka because we've maintained that's the proper one since 2001, Deca because we acknowledge that that was a mistake? It's like, one line of code and 2 lines of tests? |
Having duplication of the same prefix doesn't make sense to me. If it is a mistake to use Also allowing the duplication would make enumerations a complete pain and possibly force not having to use them. |
How would it mess up enums? It's a one-way street this: deka maps to deca, deca maps to 10, 10 maps to deca. That's the extent of it as far as I can see? Either way, this:
is not an argument. CellML is for people who want to exchange models, not for libcellml implementers. If we need a few extra lines in libcellml (or any other libraries) to make life easier for CellML users then that is absolutely fine. That's added value. Annoying details like the exact spelling of deca/deka are precisely the sort of thing I'd want a library to deal with for me |
If |
I think this is the key - no matter which prefix is used in a model, it will always be serialised as deca, which seems more confusing than helpful. But this is really a spec issue not a libCellML issue. Bumping to the spec issues and probably best for that discussion to resolve before deciding what changes to make in libCellML implementation. |
please comment on cellml/cellml-specification#21 if you have an opinion on this... |
According to discussion on the specifications thread will update the code soon. Have changed the title of this issue to follow it. |
OK, so the spec now says SI only. Otherwise this seems to have been fixed in #351 ? |
We had big discussions about this at the time ... consensus was to be consistent with removing US spelling throughout as opposed to changing between inputs->outputs. If users want to use youessian (new word for me, love it) spellings then they still can just by making an alias:
|
Thanks! |
Originally posted by @MichaelClerx in #304 (comment)
I've changed a couple of files to see what the effects of this would be. Since we can duplicate enumerated values, and since it makes sense to use those values as something meaningful (the log of the prefix value), both the "deca" and "deka" prefixes now have the same value (1). This means that reverse lookups like the
prefixToString
function will only ever return "deca" (and I would have thought that the map condition of unique keys is violated, but somehow it still runs fine ...?).The consequence of this is that:
Prefix
enum will end up with a printed string of "deca", even ifPrefix::DEKA
is used.So ... my question is do we want to convert occurences of "deka" into "deca", or do we want to genuinely support both independently? And if the latter, is it possible to do and maintain sensible values for the enums?
See this commit and the tweaked one after it.
The text was updated successfully, but these errors were encountered: