Should I learn LISP as a beginner programmer?

I have heard many people saying good things about a computer language called LISP that is supposedly very intuitive. Would this be a good idea for a beginner? Should I learn C++ instead?

My experience is only a little Basic and a little Java in college. I would like to make simple internet games or make computer generated music.

Who’s been telling you that Lisp is intuitive? Sure they’re not yanking your chain? Lisp is… different. It’s one of the oldest programming languages, and it’s very powerful, but also quite quirky - for one thing, there aren’t really variables or anything like that, so it’s a very different way of thinking.

I’d recommend Ruby or Python, but Java also isn’t bad if you have some experience there. (I work with all three.) I believe there was a recent thread talking about starting out with Python, you might find a python-buddy over there.

Java and Flash are the typical choices for browser games, and you don’t really need to know how to program in order to make music these days. If you want to learn more programming, I second the Python suggestion. Here’s the current thread that QuercusMax mentioned, and there’s a nice discussion of resources in there.

Actually, most versions of Lisp do have variables. Common Lisp certainly does.

The dialect Scheme was used for teaching programming at MIT for quite a while. Still, I’m not sure the skill transfer from Lisp to more imperative languages would be great enough to make it worthwhile.

Yes, LISP is an interesting language, but I don’t know that very much of it’s “model” would translate well into an understanding of programming other, more typical languages.

I mean, the car of the cdr of the atom? Don’t think I’d start a beginner out on this, personally.

There is no good reason to learn Lisp, ever. It is the worst thing in the Universe.

If you’re interested in functional programming, there are a lot of other languages out there that one can work with without wishing for painful death.

I’d recommend Scheme if you’re set on learning a Lisp. It’s more of a teaching language than a commercial one, and so is easier to learn. It certainly can’t hurt to learn a Lisp as your first language (many top universities use Scheme, as mentioned), and is probably better than C++ as a first language.

Others to consider: Python, Pascal, Java, Haskell.

Having said that Lisp’s draw has always been its homoiconicity, which allows you to do fancy stuff with macros. Modern functional languages have now pretty much caught up (see Template Haskell and MetaO’Caml) and don’t force you to program with the AST.

I found scheme was extremely intuitive. However, I learned scheme after having learned, in this order, C, C++, Java, python, and lua; so, perhaps you will question what sort of intuition I have here.

scheme issues that could go either way (help or hinder learning):

  • lack of complicated syntax (help: easy to learn; hinder: too free?)
  • somewhat difficult macro system (help: it’s not necessary for beginners or even intermediate users to use macros; hinder: you will look into them anyway and get frustrated)
  • recursion (help: see e.g. A Scheme Story ; hinder: recursion still trips people up sometimes regardless of the language)

scheme issues that point to its favor:

  • excellent resources available (Dr Scheme, How to Design Programs, The Structure and Interpretation of Computer Programming, Teach Yourself Scheme in Fixnum days, The Scheme Programming Language…)
  • some technical things that a beginner might not understand like first-class functions
  • lexical scoping is unusually intuitive, IMO

scheme issues that point against it:

  • not a plumbing language, despite the excellent work of many distributions like chicken and PLT; that is, libraries are lacking compared to something like python
  • not trivial to embed, compared to e.g. lua; even though it is an excellent extension language it was not designed to be used that way (but see elisp or guile)

How to Design Programs
SICP: Welcome to the SICP Web Site
TYSiFD: (maybe better if you are already familiar with programming in some other language)

No reason for lisp to dodge either of these, though the former is probably better done in java, javascript, or flash, depending on how simple you mean. The latter most any language could be appropriate, depending on how much you want to do yourself.

I think most people tend to use first and rest now (and certainly not on atoms :wink: ), but I am not super active in the community.

LISP is great if you have a parenthesis fetish, but other than that, it isn’t really used much outside of academia. If you’re looking for a hobby, go ahead, if you are looking for an employable skill, learn Ruby, Java, PHP or C#.

Ha! Everyone thinks that about Lisp. At first. After a while it grows on you. A bit later you become bitter when you have to program using anything else.

As a hobbyist programmer and professional who does a lot of scripting, Id stay focus only on languages that are based on the C++ syntax and OO way of doing things. So things like C#, Python, Java, Autohotkey, etc are good. LISP not so much. It going to be easier for you if you stick with one convention and start to understand object orientated programming, reusing of functions, etc.

For this kind of thing, youre probably best off with Flash. You can simply learn flash first instead of learning python and then jumping to flash. Later on, you can start using real frameworks like Ogre3D when youre ready.

It was my understanding that Lua, which features neither C-style syntax nor built-in OO, was the most popular scripting language in gaming now. But then, next to a lisp, I think lua is the best language out there, so I might have some selective hearing when listening to the grapevine.

The Jak and Daxter series was written in a Lisp dialect.

I’m a dabbler in programming. I grew up with a Commodore VIC-20 and 64 and was pretty damned good at programming in BASIC, and not as good but capable of simple assembly/machine language routines. However, BASIC (not vB) taught me a lot of programming habits that didn’t seem to translate well into other languages. I’ve screwed around with C, C++, C#, Java, Python, Ruby, Flash, and Perl. For me, the languages I really enjoy working with are Python and Ruby. Python seems to be a little better supported, or at least more popular, and there’s cool libraries like PyGame out there if you’re interested in making games and that sort of thing. Flash is fairly intuitive as well, but a bit more focused on specific applications, and perfect if you’re interested in making a lot of multimedia content. And, as much as a pain in the ass it is, I really do like C for teaching you the fundamentals of what’s going on a fairly low level inside the computer. If you’re somebody who really likes to know how things work, C is good for that, but it’s harder to just jump right in and do cool things with graphics, music, and the such.

I’d vote Python or Flash.

Err, no, terrible advice. We’re in the middle of a revolution: single cores giving way to multi-cores: you can’t program an eight core machine easily using a language straight out of the 60s, which is essentially what C++ is. Microsoft recognises this, that’s why they’re pushing functional languages (F#, Microsoft’s version of O’Caml will be included in Visual Studio 2010, and everybody who plays on the XBox 360 is already running code written in it, similarly, they’re hiring every big name in the Haskell world: Simon Peyton Jones, Simon Marlow, Satnam Singh all work for MS now). The message is pretty clear, especially when you look at C#, and realise it’s slowly being made into a functional language on the sly.

As people have said above, there are other languages better suited for these particular purposes. I wouldn’t learn Lisp for writing games.

But, in my opinion a programmer benefits from learning at least a couple non-mainstream languages. It stretches the mind, and shows you that the everyday Java-ish or C+±ish philosophy is not the only medium for writing or thinking about software. So for that purpose, I’d recommend Scheme (over Lisp), or Haskell, or a flavor of ML (SML, OCaml, or F#).

Also, given that parallelism is becoming more and more important in computing, the functional languages (e.g. Scheme or ML) are going to be more useful over time than the imperative ones (e.g. C++).

While I agree with this I still stand by by statements because this is advice to a beginner hobbyist coder not a hard core CS student with all the time in the world. Yes, it would be great for him to learn 12 different languages and understand all the concepts, but in the real world a hobbyist must make practical choices, thats why I recommend running with either flash or python at first. Especially flash as he can start doing simple game mechanics and graphics pretty early on.

If you’re just dabbling in computers than I would stay away from Lisp mostly because it has limited usability. If you’re planning on getting heavily into programming then Lisp isn’t a bad choice (you’ll learn solid programming techniques) but it’s not directly transferable to the most popular languages like Java.

If you’re just dabbling then I think the suggestions for Python are the best. Python can teach you most programming techniques and its structure is closer to other languages.

If this is the first step to a career then I’d suggest Java as it’s currently one of the most popular. Capt. Ridley’s concern is well-taken but learning Java won’t hurt you.

No, that would be COBOL. :wink:

I think you should chose to learn a language that best matches your goals. You mentioned web games – this suggests (as others have said) Flash/ECMAScript/JavaScript.

I like Python a lot. There are some links in the other thread including one about game programming in Python.

LUA is very popular in the gaming industry, but it is used in larger, more complicated games. I don’t think there is any reason to use it for a simple web game.

Lisp is good to learn at some point, but I think you would get more out out of learning Lisp after you have some experience under your belt.

It hurts you in the sense that the 1000 hours spent learning java could have been 1000 hours spent somewhere else especially if java didn’t align well with one’s goals.