| Everything else about Haskell is so great and well thought out (eg
type
| classes, no side effects, higher rank polymorphism, existentials) it
seems a
| pity to throw all this away just because of one unfortunate feature

I thought it might be worth mentioning that GHC (well, the HEAD, which
will become 6.6) supports "bang patterns".  See
http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/BangPatter
ns

Bang patterns make it much more convenient to write a strict function.
E.g
        f (x, !y) = ...
is strict both in the pair (of course) but also in the second component
of the pair, y.

You can also use them in lets
        let !x = <rhs> in <body>
which will evaluate <rhs> before <body>.

It's an experimental feature, and I'm interested to know how useful, or
otherwise, it turns out to be.

Simon
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to