<p dir="ltr">Wren and I made the decision to use bang patterns to make it easier for us to read and write the code. We hope that rather modest extension will be in the next Haskell Report. From my perspective, this decision is non-negotiable. It's just too hard for my poor brain to work with all the possible strictification functions we'd need for various numbers of arguments and the awkwardness required to use them. This was previously done with a combination of manual seq and CPP, and I found it nasty.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 31, 2016 5:10 AM, "Henning Thielemann" <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Wed, 31 Aug 2016, David Feuer wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Use BangPatterns throughout to reduce noise. This extension is now<br>
required to compile containers.<br>
</blockquote>
<br>
Btw. there is no strong need for BangPatterns. Instead of<br>
<br>
f !x !y = ...<br>
<br>
you can write<br>
<br>
f = strict2 $ \x y -> ...<br>
<br>
{-# INLINE strict2 #-}<br>
strict2 :: (a -> b -> x) -> a -> b -> x<br>
strict2 f a b = (f $! a) $! b<br>
<br>
<br>
Sometimes I hope that availability of portable libraries would help non-mainstream compilers to gain ground.<br>
</blockquote></div></div>