News for hackers. Stuff that matters.
Re:Please put units in names by nine_k on Monday March 21, 2022 @12:09AM (#30750148)
Certainly, but for that the type system should be rich enough to support unit designators.

I know how to implement that in Haskell, and that it can be implemented in C++ and Rust. I know how to logically implement that in Java or Typescript, but usability will suck (no infix operators).

Re:Please put units in names by int_19h on Monday March 21, 2022 @04:55AM (#30751808)
Go tends to cover such things by incorporating them directly in the language. But then it tends to not cover them at all because it would "overcomplicate" the language...

For a good example of what it looks like when somebody does bother to do it, see F# units of measure.