[Haskell-cafe] RE: [Haskell] Nested guards?
simonpj at microsoft.com
Thu Dec 6 04:03:19 EST 2007
[redirecting to Haskell Cafe]
| > It is clear that this situation must not stay this way. Bit by bit,
| > disciples of Perl and Python discover Haskell and demand that Haskell will
| > be plastered with syntactic sugar until the simplicity of the functional
| > approach isn’t visible anymore. Sadly, they seem to be successful with this
| > as syntax extensions like parallel list comprehensions show.
I think it is helpful to distinguish "superficial" complexity from "deep" complexity. All of Haskell's syntactic sugar is just that: it can be translated into a small purely-functional language using straightforward translation schemes. Even something relatively complicated like the "order by/group by" extension that Phil and I proposed at this year's Haskell workshop, has an easy translation that takes a dozen or two lines to give in full detail.
In contrast, something like higher order functions, or mutable state, is deep complexity. Both have a pervasive effect on the language semantics and on its implementation. (The effect of mutable state is much, much worse, but they are both deep.)
Concerning Haskell, I'm quite relaxed about superficial complexity, as you'll have seen from what happens in GHC. Section 3.6 of the History of Haskell paper addresses this point specifically . You may disagree with the choice made by the Haskell committee at the time, and with subsequent developments, but it was quite a conscious choice, and one not without its advantages.
More information about the Haskell-Cafe