Re:Ask HN: Why Haskell?
by coolsunglasses on Sunday March 30, 2014 @08:22PM
(#7498662)
Your comment misrepresents the reality for Haskell programmers.
Re:Ask HN: Why Haskell?
by SamReidHughes on Sunday March 30, 2014 @08:41PM
(#7498748)
If you wanted a useful reply you could explain how. The grandparent has things backwards -- it's possible for functions to force restrictions on their callers (by forcing them to pass a pure function as a parameter). The caller can't force the callee to consider all cases of its input.
No it doesn't (force). It's about as good as C++ on this front, with better error messages. What it does do is make it a lot easier to program in a style that handles all cases, but without forcing you to do so. You can pattern match on something instead of making a visitor. But you can still call head or tail.