News for hackers. Stuff that matters.
Re:Haskell’s Niche: Hard Problems by silentbicycle on Monday March 14, 2011 @01:02PM (#2323299)
Ints and strings are a poor example because they have a very large domain. These features are much more useful when you're talking about more complex data structures, like the intermediate representation in a compiler. I think typechecking is most useful with complex data structures, anyway - their invariants can be built into the type.

There are other languages with the ability to constrain types to specific ranges, etc. (without having to define e.g. RInt of One | Two | Three | Four | ...), but they're still pretty obscure.

There are no comments on this comment yet.