Hacker News new | ask | show | jobs
by cwhy 1870 days ago
This is rather a math-specific operation (type conversion on math operators), not the scope of general purpose language. A lot of dependent typed language can achieve this naturally and most languages with ADT can simulate this.
1 comments

> This is rather a math-specific operation

Math is a kind of a core use case for, really, almost any programming language, and is central to much of what computers are used for (as is hinted at in their name.)

Though dealing with this aspect of units is less “math-specific” than central to the relation between math and real-world meaning, which is arguably even more important than abstract math in computing applications.