Hacker News new | past | comments | ask | show | jobs | submit login
F# to get units types (msdn.com)
21 points by mark_h on Aug 31, 2008 | hide | past | favorite | 9 comments



More languages should have a facility for keeping track of units and doing conversions, regardless of whether it's done in the type system or at runtime.

Making this a part of the type system seems a little strange to me. Obviously it's nice to get warnings at compile-time or in the IDE. But I keep trying to imagine how you might make a feature like this useful as a parameter to strings, or a user-defined type, and with functions other than the arithmetic operators.


So was the problem with the Mars Climate Orbiter caused by mixing up 'English' or Imperial units with metric units?

http://en.wikipedia.org/wiki/Mars_Climate_Orbiter

http://en.wikipedia.org/wiki/English_unit

http://en.wikipedia.org/wiki/Imperial_units


JPL developed the software and used 'English' units consistently, NASA developed the Orbiter and used metric.


I'd never heard of 'English' units before, we call them Imperial.


Why are the code samples in images? I guess because they are intended to be screenshots of the IDE, but it sure makes them look crappy if you have the page zoomed.


I assume to show the type inference popups of Visual Studio. A better choice would have been to use the CopySourceAsHtml add-in and only capture the popups as images.


At least they're not animated: http://redhanded.hobix.com/


F# is prominent on my radar.

If they will fully optimize non-mutable structures and functions across processors I think it's a game-changer for Microsoft. But having said that, it might be five years before all the pieces come together.

It has a lot of promise.


In the past 3 or 4 years, Microsoft has really changed its stances on a lot of things in terms of languages. Between the DLR and F#, it certainly makes me mind working on .Net a little less.

I do wish Rich would resume support of Clojure on .Net, but I understand why he chose to focus on the JVM alone.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: