
--- Matthias Fischmann On Thu, Jun 22,
2006 at 09:22:34AM +0100, Simon Peyton-Jones wrote: To: Brian Hulley
From: Simon Peyton-Jones http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/BangPatterns 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. i am ecstatic
to hear that :). Well, you shouldn't be too enthusiastic, but rather follow
the above link ... if it really means that 'y' will be fully evaluated
(not top level
normal form, but whatsthenameforthis, in the way ocaml evaluates expressions), it's something i have been missing so much that i was thinking of switching back to a strict language again.
... to find out
that that's exactly not what bang patterns will do for you. They are compiled
into uses of seq, which means evaluation to weak head normal form.
Ciao,
Janis.