3 ms·
Ask HN: What Lisp dialect should I learn?
I don't know any functional language and would like to get started with Lisp. Which implementation should I go with? Maybe Clojure? It seems pretty popular on HN although it's not mainstream yet...
- nostrademons 17y agoHonestly, I'd start with Scheme, because it's a small language and will teach you the basics of Lisp-like languages. Once you understand closures, and macros, and continuations, and data abstraction in Lisp-like languages, and how you can build just about anything out of these building blocks, then you can learn the more advanced stuff that Clojure or Common Lisp has. For implementations, I'd probably start with PLT Scheme for learning. It's fairly complete and easy to get up and running with. Some other implementations are faster (Stalin), and some may have more practical libraries (Bigloo, though that's debatable), and some may have more interesting implementations (Chicken), but PLT's a fairly well-rounded early choice. (Disclaimer: I started with Bigloo and my experience with PLT is limited to getting Arc to compile on MzScheme.)
- olalonde 17y agoI wasn't aware that Clojure had a steeper learning curve. I'll do as you recommended: start with Scheme to grasp the basics of Lisp and eventually move on to more advanced stuff. Thanks.
- dkersten 17y agoIMHO Clojures steeper learning curve comes from having more features built right into the language. Scheme is refreshingly simple, but Clojure gives me so much more, right out of the box: instead of being based around lists, as Scheme and Common Lisp are, Clojure is based on sequences (which are really just an abstraction over lists, vectors, maps, sets and regexes - but this means you get lists, vectors, maps, sets and regexes built in); Clojure has direct access to the JVM and therefore Java objects; Clojure has built in multiple dispatch, concurrency support (with transactional memory) and a bunch more. So, while Scheme is definitely a lot simpler, Clojure has a lot more built right in (I'm fairly sure Scheme provides libraries for a lot of, if not all, of these features though). Actually, since most of Clojures advanced features can be ignored, I think the only thing thats more complex is the way the syntax uses () and [] (though, IMHO it does make the code simpler once you understand it) and the list/vector/maps/sets - since instead of everything being a list, it can now be one of many different data structures (though in practice having them makes life easy). Clojure also benefits from a wealth of libraries, since you can use any Java class directly from Clojure. Disclosure: my experience with Scheme is limited to reading SICP, but I've been using Clojure a LOT over the past 4 or 5 months, so obviously Im biased :-)
- mahmud 17y agoClojure doesn't have a steep learning curve per se, it's just that what is "clojure" changes on a monthly basis. The language is not standardized and it's undergoing massive changes in short time. It's very promising, but I would wait for it. I recommended Scheme to you above, even though I use Common Lisp myself.
- cabalamat 17y agoDepends what you are trying to achieve. If you primarily want to learn the language, Scheme is a good choice. Ifd you want to write code that would benefit from Java's extensive libraries, Clojure is the obvious choice.
- davidw 17y agoIf it's just a functional language you want, you ought to consider other things too: * Haskell: very 'pure' functional language from academia, much more so than Scheme. * Erlang: slightly more practical functional language that's used in industry and has some nice properties, but is probably not a 'thing of beauty'. * F# and Ocaml seem to have their supporters too... Clojure seems to be popular these days if it's a Lisp you want.
- plinkplonk 17y agoThe "learning well" of a dialect is more important than agonizing over choosing any particular dialect. Pick one at random and write some large (5k to 10k line) programs in it. Read some programs written by great programmers who use that dialect. The knowledge you gain will transfer very easily into the dialect you choose next (and you will get more informed by then and won't have to ask in forums).
- mahmud 17y agoScheme. The amount of high quality, and mostly free Scheme literature out there is overwhelming.