But imagine describing an area in meter•feet instead of square feet or square meters. That could really piss everyone off.
Comment on Hmmmm
Buddahriffic@lemmy.world 5 weeks agoVariables can be in arbitrary units. If you put the units through the same steps as the values, you’ll end up with the right unit, plus you need the values to be in compatible units for the operations to even make sense. At least as long as any constants are also given the correct units. This can also help discover cases where you accidentally mix similar but different units (like litres and gallons).
I also find it very satisfying to do those equations on the units, adding ones that get multiplied in and cancelling ones that get divided out, and then ending up with a unit that makes sense, given what the equation was supposed to express.
Though we might be saying the same thing, because while I don’t think variables need units, expanding that variable with a value absolutely should involve a unit, as should any examples of that equation’s use.
exasperation@lemm.ee 5 weeks ago
Buddahriffic@lemmy.world 5 weeks ago
We’re going to need two kilometer inches worth of markings for this football field!
Someonelol@lemmy.dbzer0.com 5 weeks ago
Yeah it’s stuff like this that can make a huge problem like with the Mars Climate Orbiter crashing because its programmers were mixing and matching SI and Imperial units. Adding a few minutes to a document can save hours of looking stuff up for the reader later.