
On Aug 8, 2006, at 5:36 PM, Albert Lai wrote:
"Brian Hulley"
writes: Also, the bottom line imho is that Haskell is a difficult language to understand, and this is compounded by the apparent cleverness of unreadable code like:
c = (.) . (.)
when a normal person would just write:
c f g a b = f (g a b)
All mainstream languages are also difficult to understand, with similarly clever, unreadable code. Let's have a fun quiz! Guess the mainstream languages in question:
[snip]
2. What language allows you to test primality in constant runtime? That is, move all the work to compile time, using its polymorphism.
GHC-Haskell (with enough extensions enabled)? We're most of the way there already with type arithmetic. I bet putting together a nieve primality test would be pretty doable. In fact, I suspect that GHC's type-checker is turing-complete with MPTCs, fundeps, and undecidable instances. I've been contemplating the possibility of embedding the lambda calculus for some time (anybody done this already?) Oops. I see now the qualifier "mainstream". The point still stands, however. Rob Dockins Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG