--- Matthias Fischmann <[EMAIL PROTECTED] wrote:

> On Thu, Jun 22,
2006 at 09:22:34AM +0100, Simon Peyton-Jones wrote:
> > To: Brian Hulley
<[EMAIL PROTECTED]>, Joel Reymont <[EMAIL PROTECTED]>
> > Cc: [email protected]

> > From: Simon Peyton-Jones <[EMAIL PROTECTED]>
> > Date: Thu, 22 Jun
2006 09:22:34 +0100
> > Subject: RE: [Haskell-cafe] Re: Functional programming
for processing
> >     oflargeraster images
> > 
> > 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.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to