3 ms·
It would be great to have dimensional analysis in typing systems of programming languages.
by jraph 7y ago
It would be great to have dimensional analysis in typing systems of programming languages.
- momentoftop 7y agoF# has had typed units of measure for over a decade, with Hindley-Milner style type-inference, so you can do stuff like let foo x y = (x:int<m>) * y + 10<m/s>;; And it infers that y has type <1/s>. You can add whatever dimensional types you want.