5 ms·
In a language without units of measure, `get_height` should be documented!
by Smaug123 3y ago
In a language without units of measure, `get_height` should be documented!
- aidos 3y agoget_height_in_inches
- biofox 3y agoLockheed Martin didn't get the memo: https://en.wikipedia.org/wiki/Mars_Climate_Orbiter https://en.wikipedia.org/wiki/Mars_Climate_Orbiter
- eschneider 3y agoFor languages with types, you can (and absolutely should) use types for your units (rather than raw double/float/int) and encode your conversions into your types. You can thank me later.
- Smaug123 3y agoSpecifically in languages with types and zero-cost abstractions. If it's not zero cost, then… there's a cost, which must be weighed.
- magicalhippo 3y agoIndeed. We've just been through this a few days ago here with a customer. We have fields for gross and net weight, GrossWeight and NetWeight, and the official systems which we talk to expect this to be in kg, so "of course" our fields would be in kg as well. Well, nobody documented units in the file exchange documentation, so customer sent us weights in grams because that's how they stored it.