Hacker News new | past | comments | ask | show | jobs | submit login

It would be great to have dimensional analysis in typing systems of programming languages.



F# 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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: