
8 Apr
2013
8 Apr
'13
11:53 a.m.
On Mon, Apr 8, 2013 at 7:59 AM, Joachim Breitner
Hi,
I believe one problem with non-linear patterns would be that the compiler has to figure out what notion of equality you want here. An obvious choice is (==), but the Eq instances might not do what you want. Using pattern guards or view patterns explicates this choice.
What other types of equality would be possibilities? Also, for some history, this was discussed a while back: http://www.mail-archive.com/haskell@haskell.org/msg03721.html Erlang programmers have this feature without shooting themselves in the foot too often. That said, I'm happy without it. Tom