[Haskell-cafe] Why Not Haskell?
Donald Bruce Stewart
dons at cse.unsw.edu.au
Wed Aug 9 10:03:52 EDT 2006
robdockins:
> On Aug 8, 2006, at 5:36 PM, Albert Lai wrote:
>
> >"Brian Hulley" <brianh at metamilk.com> 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?)
http://haskell.org/haskellwiki/Type_arithmetic#A_Really_Advanced_Example_:_Type-Level_Lambda_Calculus
also
http://haskell.org/haskellwiki/Type_arithmetic#An_Advanced_Example_:_Type-Level_Quicksort
-- Don
More information about the Haskell-Cafe
mailing list