3 ms·
The later statically typed languages like Haskell make it relatively easy to create a type which is internally stored as some base type, like an Integer, but at
by jerf 15y ago
The later statically typed languages like Haskell make it relatively easy to create a type which is internally stored as some base type, like an Integer, but at the type system level is treated as a distinct type. Thus one can not accidentally multiply a Pixel by a Millimeter when trying to compute an area on the screen, while under the hood pixels and millimeters are still just Ints (or whatever). "Real" Hungarian is a good hack for languages lacking that.
- njs12345 15y agoIf you're willing to go even further with Haskell you can do some really crazy stuff: http://code.google.com/p/dimensional/wiki/GMExample http://code.google.com/p/dimensional/wiki/GMExample