
On Thu, Jul 5, 2012 at 5:21 PM, Christopher Done
I like \case as is proposed. It seems the least controversial one and there's curry (\case ) for two-args, but even that seems a rare case.
For what it's worth, I like the idea of omission being partiality, as in case of and if then. It seems perfectly natural to me, I don't need a \ to tell me that an expression will result in a function. But some do. So I'll go along with and vote for \case. The lack of a lambda case is one of the few "legitimate" complaints I have about Haskell's syntax so it would be marvey to see it in GHC.
I agree. I think the partial application metaphor in "case of" is very nice, but \case is okay enough, so I'm voting for whatever is most popular as long as it does the job and doesn't break compatibility.
P.S. \if then … else …?
I'd prefer just getting a function of type a -> a -> Bool -> a and partially applying it. We need a language level solution for case because case of is fundamental and you can't do that. But if then else is just sugar. (That being said one of my principles is to trust people not to make their own code ugly on purpose, so if people really want partially applied if then else then I guess let them have it else who cares. But I don't really see the case for it.) -- Your ship was caught in a monadic eruption.