Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jraph
on Dec 14, 2019
|
parent
|
context
|
favorite
| on:
Seven deadly sins of talking about “types” (2014)
It would be great to have dimensional analysis in typing systems of programming languages.
momentoftop
on Dec 14, 2019
[–]
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: