Re:Intro to Haskell for Erlangers
by lostcolony on Sunday March 09, 2014 @03:25PM
(#7369570)
It shows later in the slideshow, no? Slides 40-41.
[ Parent
| on HN ]
I see, it's just the non-linear patterns? Looks like they were considered for Haskell and there are some good arguments against them: http://www.mail-archive.com/[email protected]/msg03721.htm....
Re:Intro to Haskell for Erlangers
by lostcolony on Sunday March 09, 2014 @05:31PM
(#7370050)
I don't know if it's only; didn't see the talk. I can see why to exclude it, but Erlang has everything in place to make its inclusion a very obvious ones. All data types are comparable, for ill or for good (I've been both helped and hurt by it), and allowing non-linear patterns makes for some very clean pattern matching code for many recursive functions.
Yes, Erlang patterns are non-linear, Haskell has view patterns. Neither are more powerful than the other. They are just different.
Erlang non-linear patterns fit more with the semantics of match where an already bound name isn't shadowed, view patterns fit well into Haskell because of the ensured purity.