News for hackers. Stuff that matters.
Re:John Hughes Contrasts Erlang and Haskell by jganetsk on Tuesday November 10, 2009 @10:21AM (#933156)
Dynamic typing is merely a mode of use of static typing. All you have to do is add one line of code to your Haskell program:

data Dyn = I Int | C Char | S [Char] | F (Dyn -> Dyn) | P (Dyn, Dyn)

Now you can do matching "by structure" in Haskell just as easily is you can in Erlang.

There are no comments on this comment yet.