[Haskell-cafe] Call to arms: lambda-case is stuck and needs your help

Daniel Trstenjak daniel.trstenjak at gmail.com
Fri Jul 13 09:16:23 CEST 2012

On Thu, Jul 12, 2012 at 03:13:42PM -0400, Cale Gibbard wrote:
> There are of course already lots of ways to create functions which
> don't involve \

Well, I think it should be clear that we're talking here about
anonymous functions.

> We're not exactly talking about function definitions, so much as
> expressions whose value happens to be a function. The point is just
> that there are already a few other places in the syntax where the
> omission of a value results in a function having the omitted value as
> its parameter. At least to me, it seems natural to extend that pattern
> in this case.

The question is, how self explanatory is the syntax? I think that
sections and partial function application are pretty self explanatory
just by looking at the expression, because it tells you visually pretty
well what it actually does.

'case of {}' isn't self explanatory, because you don't have a visual
hint what happend with the parameter between 'case' and 'of'.

I can see why - I think it was Simon - proposed '\of', because you could
read it as if the parameter between 'case' and 'of' is applied to the 'of'.

I don't like the version 'case of {}' and I even don't like the version
'\case of' that much, because I think both versions degrade the syntax
of Haskell, which is part of the beauty of Haskell and we shouldn't rush
in expanding it, only for pragmatic reasons.


More information about the Glasgow-haskell-users mailing list