Open pattop opened 6 years ago
In my experience, most variables and function names in programming use US English: I've often seen color
classes and variables names but hardly ever colour
. Even the C++ standard itself uses US English (same example; the 2D Graphics proposal spelled "colour" as "color").
In my experience most engineering/scientific papers & text books prefer the spelling metre because that is the spelling used in ISO 80000-1:
In this International Standard and in the SI, there are seven base quantities and seven base units. The base quantities are length, mass, time, electric current, thermodynamic temperature, amount of substance, and luminous intensity. The corresponding base units are the metre, kilogram, second, ampere, kelvin, mole, and candela, respectively.
However, I wasn't arguing for one or the other. I was asking if units could support both.
Citing ISO, fair enough :p
:)
@pattop it can. I have aliases for other units where they are common. I'm American so I definitely won't be convinced to use only ISO/British spellings (just saying for the record, I know that's not where you were going with your issue). That being said, any of my contributors could tell you I can't spell anyway in any of the above systems.
OK great. I'm happy to have a go at a patch if you point me roughly in the right direction.
https://github.com/nholthaus/units/blob/40e425ff25fe7739d167d9958ce84d5522510b7d/include/units.h#L3114
It's just a copy&paste of that line with the new spelling.
Actually, that shouldn't work because you'd try to redefine m
.
yeah I'm just going to add this as an alias of meter_t
, not as a whole new unit.
in the latest v3.x
I got caught out with this, compiler error that metre_t
isn't found. I may have to import things like "color", but I religiously stick to proper spelling and camelCase in my own code XD. Helps in case I have to model a meter that's read in metres.
According to Wikipedia all English speaking countries apart from the United States and the Philippines use the spelling metre.
Personally it is very jarring for me to use the library with the wrong (for my brain) spelling.