开发者

LISP or Haskell [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. 开发者_如何学JAVA Closed 12 years ago.

LISP or Haskell, I need to learn functional programming, but I heard that lisp is very old, any advice between those two languages ?


Just to echo the others, I'd learn both Scheme (a more functional Lisp dialect) and Haskell. Scheme / Lisp have some useful tricks to teach you about 'code is data / data is code' and macros. Scheme encourages a good functional style and I would recommend the 'The Little Schemer' series of books to get you started on this. SICP is also a fantastic text http://mitpress.mit.edu/sicp/full-text/book/book.html and possibly one of the best books ever written on programming. Scheme is more accessible as a first functional language.

Once you've got the hang of Scheme you'll probably find yourself becoming frustrated with the lack of libraries, lack of parallelism and the small, although excellent, community. This is where I was when I decided to learn Haskell. Haskell is very mature, very useful and very functional and it is quite a challenge to learn once you move off the basics and so having a grounding in another functional language will help enormously. You won't regret learning either (or both).


Why not both? LISP is very easy to learn (I'd go for the Scheme dialect - see http://racket-lang.org) so I'd start with that. If you like it, stick with it, but I'd also give Haskell a go, although it is (in my experience) considerably harder to wrap your head around.

The great thing about computing these days is that you can try all these languages for free, apart from your time. When I started programming LISP was only available on mainframes, which put a bit of a crimp on trying to learn it.


Haskell, because once you've learned Haskell, you will love it. And then, you will be able to learn Common LISP. However, if your editor is Emacs, then go start with Lisp.


If you want to learn functional programming through implementing a compiler or interpreter of a language, then Lisp or ML should be a better first choice as they're much simpler to implement than a lazy language. Otherwise you'd better learn both.


Choosing based on age is silly, Haskell has been around much longer than say C# and its history extends back a lot further. Anyway I'd recommend learning both eventually, for learning functional programming, Haskell is specifically about purely functional programming (in a number of senses of the meaning). Scheme is a functional orientated descendant of lisp.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜