I was very impressed when seeing units of measure in F# the first time and believe it's a great selling point for the language.
Thanks, I find this very interesting. I imagine it can be helpful in many situations.
Very interesting ...and deep ... another nice interview Charles!
We've seen Don Syme several times on C9 ... its nice to finally see Andrew Kennedy!
However ... the code is completely unreadable!!! C'mon cant you guys ever use a larger font? Try 14 please!! Or Just use the new Zoom feature in the VS2010 editor!!
I'd like to actually see the code!!!
One of my favorite F# features. Thanks for this great interview!
(and unfortunately keithfl is right about the unreadable code )
interesting so this is strictly a compile time feature? its not "generics" really, its sort of compile time generics?
thats the impression i got
--edit--
also, is this just for floats? can a unit be any type? for instance if you have a class Person, could you create a unit of measure for Employee, manager and so on? (just as an example)
Yes, this is strictly a compile-time feature, so units errors get caught at development time, and there is no runtime performance hit.
It's for any types you like. Built-in types float, float32, decimal, and int can be parameterized on units, but you can build your own, e.g. vectors, complex numbers, matrices, or whatever. My blog (http://blogs.msdn.com/andrewkennedy) has more info.
Ah - sorry about the unreadable code. I had been assuming that the screen would be captured in high-res. A lot of the examples that I used are also discussed on my blog. The Lunar Lander code was written by Phil Trelford but I'll put it back together and post it here shortly.
My apologies for the poor resolution of the code demo on-screen. The way that we captured this is the problem. We are working on a solution to this general problem. See, we don't expect interviewees to have to install screen capture software on their laptops in order to record a demo in the studio. That said, we aren't yet sure of a practical solution that also affords least effort on the part of our guests. Working it out.
Thank you in advance, Andrew, for sharing the code in project file format. The domo code should be much easier to read in Visual Studio or a text editor
Again, we will work this out.
C
very cool.. we do alot of physics calculations for measuremnts on lasers so this could be very useful are you making any large changes in beta2 to this or is the beta1 functionality kinda stable?