[Haskell-cafe] Announcing containers 0.5.8.1

wren romano wren at community.haskell.org
Thu Sep 1 02:21:50 UTC 2016


On Wed, Aug 31, 2016 at 6:44 AM, Alexey Khudyakov
<alexey.skladnoy at gmail.com> wrote:
> On 31 August 2016 at 12:10, Henning Thielemann wrote:
>> Sometimes I hope that availability of portable libraries would help
>> non-mainstream compilers to gain ground.
>
> Compiler that doesn't support bang patterns (and half of GHC
> extensions) cannot gain ground.

Bang patterns (i.e., the kind we are using which are always top-level,
not intermixed with patterns) are an extremely simple extension. Every
time someone says "it's so easy to avoid BangPatterns, you can
just..."— well, yes: it's so easy, alternative compilers can do
exactly what you suggest in order to implement BangPatterns.

The whole point of BangPatterns is not to increase expressivity of
Haskell, it's to clean up code by saying what you mean. In Haskell we
value saying what we mean, and avoiding exposing implementation-detail
cruftiness; and this is simply another example of that. By avoiding
CPP hackery we (a) make the containers code much cleaner and easier to
read, (b) avoid needing to worry about CPP possibly doing unexpected
things, and (c) avoid needing to worry about whether our tests
actually test what we mean (since using CPP means doing variational
programming, so we don't necessarily run the variant of the code we
think we are).

-- 
Live well,
~wren


More information about the Haskell-Cafe mailing list