logoalt Hacker News

bananaflagtoday at 8:51 AM1 replyview on HN

I think the behaviour is good as it is, it is just the output display that should be consistent (as I suggested in my example).


Replies

bjolitoday at 12:15 PM

Yes. But treating in a strict division isn't really what people expect. Then 12mi/h in km/h becomes "19.3xyz" not "19.3xyz km/h".

The least surprising thing would be to enforce unit output. If I say I want "in km/h" the output should be in km/h or show an error. It is however less fun. Getting becquerel when you forget a unit along the way is the kind of spice that makes life fun.

Treating "in" as strict division also doesnt solve the surprise of getting Bq or Hz when you accidentally end up with something that is N/s