开发者

Any suggestions for which Lisp variant to learn? [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. Closed 10 years ago.

I ultimately want to learn Clojure, but I've found learning resources for Clojure to be scarce for people of little exp开发者_运维问答erience...

I'm wondering if it would be beneficial to start with Scheme (read The Little Schemer and SICP) or some other Lisp variant.

My only other programming experience is with Java and Python (which is pretty minimal). I ultimately want to study Clojure in my off-time since I find it fascinating and my college classes use Java.


Stuart Halloway's book is an excellent resource if you're just starting out. There are couple new books in the works that are available for download in an early form (Joy of Clojure, Clojure in Action, etc.).

Also I highly recommend the mailing list as well as the irc channel. Especially the irc channel, there's a lot of helpful people there and questions are usually answered pretty quickly.

While learning Scheme is certainly helpful (now that I've played around with Clojure for a year) I would also say that's unnecessary for learning and having fun with Clojure.


I'd go with Scheme. It's simple, minimalistic, extremely consistent and it could be argued that it's more functional than LISP (which is nice if you want to learn a new paradigm). I've also found Scheme IDEs much more user-friendly than LISP's (PLT Scheme is a good one).

In addition, there are plenty of excellent resources on either Common Lisp or Scheme, so that shouldn't be the deciding point.


Common Lisp using Practical Common Lisp.


I second dnolen's recommendation of grabbing S. Halloway's book (I bought it, and it's great) and learning Clojure right off the bat.

I worked my way (partly) through SICP a while back and really struggled. I found Clojure pleasantly simple after that, possibly because I'd already had a bit of experience with Scheme. Still, especially for someone who's already familiar with Java, I'd say it's cool to jump right into Clojure. Rationale:

  • You have convenient access to the entire Java API and the entire body of libraries written for Java; for example, I recently built a Swing GUI for/from a Clojure program, and used the Apache HTTP components to do some Web wrangling.
  • Clojure tries to be less "lispy" than other Lisps: Cases in point are:
    • reduction of "unnecessary" parentheses: e.g.
      (cond (condition) (value) (condition) (value)) rather than
      (cond ((condition) (value)) ((condition) (value)))
    • use of something other than parentheses in a few meaningful places; e.g. argument lists and bindings for let and loop, etc. are in [square brackets] rather than (parentheses). Makes function definitions easier to read IMHO.
    • the list is not the only data structure. There are well integrated
      • [vectors] (random accessible like arrays) and
      • {hashmaps};
        These make life easier, especially if you're used to having them in Java.
  • The function for defining functions is (defn). You of all people should appreciate that ;)

A recommend-worthy first tutorial is Moxley Stratton's Clojure Tutorial. There's also a huge SO discussion on Clojure tutorials that yields up a lot of links.

Something I found enormously helpful with my first steps in Clojure was the Clojure Cheat Sheet. This addresses the common case where you know roughly what you want to do, but not which function to use. One would wish other languages would adopt this concept. Having found a likely function for your need, you can get more documentation on it using (doc <name>) in a Clojure REPL.

Your mileage may vary, of course; but by the time Amazon delivered Programming Clojure I had already learned enough Clojure from the Web that the book was more a source of "the big picture" than a tutorial for me. But certainly one could do a lot worse than learn Clojure programming from that book.


Possibly it's apparent from the above that I'm enthusiastic about Clojure. I find it refreshingly different after years of Java, and powerful enough to accomplish whatever itches me. I even donated to the project :)

At the risk of regretting this later, I also offer (free) beginning Clojure assistance and tutoring via email, Google Chat or Wave. My mail address should be pretty easy to guess.


I started with the book Practical Common Lisp, and use Emacs & SLIME with Steel Bank Common Lisp.


I suggest that you start with Scheme and then move on to Common Lisp, as Scheme is simpler. As you are new to Lisp, a good starting point will be Teach yourself Scheme in Fixnum Days by Dorai Sitaram. Once you are comfortable with the basics of the language, you can start working with SICP.

For Common Lisp, you can follow a similar path: start with a simple tutorial based approach, become comfortable writing small programs then read a book that will teach you advanced concepts. I suggest the following books to learn Common Lisp. Take care to read them in the given order: COMMON LISP: An Interactive Approach (Stuart C. Shapiro), Successful Lisp (David B. Lamkins), Practical Common Lisp (Peter Seibel) and On Lisp (Paul Graham).

Paul Graham has also written ANSI Common Lisp, which is a good reference.


Learning something new is almost always good. And if you only know Java and Python, then learning a functional programming language will stretch your mind.

Scheme is among the simplest of LISP variants, and it's well-documented. Go for it!


There really only are two common variants, Scheme and Common Lisp. They are very similar, both have a variety of implementations, and switching between the two is easy enough. If you want to write an application, I would suggest CL because of the superior libraries. If you want to learn FP style, go with Scheme.

In addition to the books mentioned here, I also suggest "Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp" by Peter Norvig.


I was in your position, and split my attention between Scheme and Common Lisp. Looking back now I think that (for the purposes of learning Clojure, as opposed to personal development) I would've been better off focusing on Common Lisp, with Practical Common Lisp and PG's On Lisp.

Now that there are actual books focusing on Clojure, you should definitely go with one of those. Joy of Clojure is a great book, and 4clojure.com is a good way to get some practice solving puzzles with Clojure.


newLISP - hmm..., because it is modern (and the only ??) LISP-based general scripting language ? (I'm not counting AutoLISP and such, because they are domain specific scripting langs). So if you will like it very much maybe in the future you will drop Python through the window :-) )


I would go with LFE, the speed you learn is proportional to the amount of bugs you experience. Choosing LFE will give you both Erlang and Lisp at the same time.


For the visual/audo learners i highly recomend Righ Hicky's video series on blip.tv
Clojure for java programmers and then just hit the REPL. The rest of the series follows naturally and can really get the creative juices flowing. PCL (Practical Common Lisp) is an exciting book though some of it is not really applicable to clojure. I highly recommend the chapter on Macros.


ANSI Common Lisp - OnLisp ANSI Common Lisp

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜