Bang patterns

Johan Tibell johan.tibell at
Mon Feb 4 22:21:31 CET 2013

On Sun, Feb 3, 2013 at 4:44 PM, Ben Millwood <haskell at> wrote:
> I have two proposals, I suppose:
> - make bang patterns in let altogether invalid

I would prefer it to be valid. It's the syntactically most lightweight
option we have to force some thunks before using the resulting values
in a constructor that we have. Example

    let !x = ...
        !y = ...
    in C x y

The alternative would be

    let x = ...
        y = ...
    in x `seq` y `seq` C x y

which obscures the code much more.

My 2 cents.

-- Johan

More information about the Haskell-prime mailing list