On 05/10/10 07:52, Nicolas Wu wrote:
I'd prefer to see something like
        \ 1 ->  f
        | 2 ->  g
but I'm sure something could be worked out.
While I think the "case of"
is a good idea, multiple clauses in lambdas seems more canonical to
me.

Alternatively, we could abandon lambdas and just use lambda-case.

All expressions like \1 -> f become case of 1 -> f

Multi-argument functions are a bit more verbose, as we effectively go back to single argument functions with manual currying:

\x (C y) -> z becomes: case of {x -> case of {C y -> z}}

There is the small matter of losing backwards compatibility, of course. But on the plus side, this would reduce the number of constructions in the language by one. (I think the strictness semantics, etc match up for this transformation?).

;-)

Thanks,

Neil.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to