Ask HN: Deciding between Haskell & Lisp

4 points by lallysingh ↗ HN
Hey folks, I'm going functional and want to decide between the two. Some of my thoughts and concerns are below. I'd love to hear your thoughts on it.

Why I like Haskell:

- It compiles to native code (in GHC)

- It has a grammar

- The type system looks fascinating

- GHC also has native support for Literate Haskell files, which sound pretty useful considering the density of functional code.

- Lazy evaluation looks like a great way to pass around work for threads, or to model certain problems.

- It's nice how they handled side effects ala Monads.

Why I'm still curious about lisp:

- I don't know how to compare CLOS or macros against Haskell's functionality.

- Emacs. A single language across the board could be nice. I've been a long-time user for it, but mostly for imperative languages, org-mode, and latex.

- Connections to old hacker lore & culture. Tons of old stories on Lisp being wonderful, AI research, etc. Considering how simply lisp's survived & evolved over the last 50 (!) years, there's apparently a lot more to the whole thing than I can determine beforehand.

Of course, the real decision is which one becomes my first native functional language, and which one becomes the second. But it's really going to boil down to which one I choose for my next personal dev project. The second will have to be an experimentation platform, based on the lens developed in the former.

I suspect others are in the same situation (for differing reasons) and hope that this thread be useful to them as well.

Thanks in advance!

-Lally

4 comments

[ 6.5 ms ] story [ 22.3 ms ] thread
I'd try to start learning both. Spend a few days learning lisp, do as much of it as you can. Then, spend a few days learning Haskell.

After you start picking up on their essence, I'm sure one of them will feel like home more so than the other and you'll understand their individual raisons d'etre.

Can you learn enough to know a meaningful difference in a few days, though?

Also, it seems to me that Haskell is harder to learn /incrementally/; ie, you have to learn much more before you can write anything useful. I got ~halfway through the 'monk' book without feeling I could write anything useful; but maybe that's just me.

Add OCaml to your shortlist.

What sort of applications are you trying to write? Which language has the people working in your field? That's what it boils down to really.

In CL, I find it natural to program functionally most of the time, but use side effects whenever it suits me. That leads to a different mentality than pure functional programming. I like it because it's pragmatic. But if functional purity appeals to you, you may want to go with Haskell (or Scheme).

p.s. "It compiles to native code" is true of CL as well.