Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm coming from a Java / PHP background and after I read this little essay by Paul Graham I started wondering about picking up a new language namely Common Lisp to speed up my work (I'm a web developer).

I'm writing pet projects currently but I have some business plans for the future. Paul speaks about LISP in his essay as a "Secret weapon". I don't know if this statement is true after 10 years but I dipped my toes into a nice CL tutorial and it looks like that LISP may be superior for web development.

Paul also mentions Python as a nice choice which I actually familiar with. My question is: which one should I choose for my future web projects?

What I was thinking about:

  • I'm not going to develop desktop applications so I can choose whatever language I prefer.
  • python seems to have a very large community thus a mutch more libraries / frameworks compared to lisp
  • I found out that lisp has some functionality (like macros) which cannot be found anywhere else
  • I mostly work alone or with 1-2 other programmers but finding someone with lisp knowledge can be hard

So what do you think?

share|improve this question
    
How large is the Python community compared to PHP? I assume that finding a Python developer may be hard too, compared to find a PHP developer, so I tend to only chose between these to options if the project is experimental. –  Vash Aug 11 '11 at 13:51
    
I don't really like PHP so this is not an option for me. Since I am my only boss no one forces me to use something I don't like. :) –  Adam Arold Aug 11 '11 at 13:54
2  
@Vash Python's development community might not be as huge as PHP's, but it is still very large. Moreover, I find Python's online documentation to be vastly superior to PHP's. –  quanticle Aug 11 '11 at 14:42
    
That is true I think. –  Adam Arold Aug 11 '11 at 14:45
1  
I don't believe that no one is mentioning Clojure yet! –  Chiron Aug 11 '11 at 15:30
show 2 more comments

8 Answers

up vote 7 down vote accepted

You are coming from Java background, so why not checking Clojure programming language?
It is a modern Lisp dialect that lives on the JVM, so you have access to tons of JARs out there.

While you aren't going to find polished and production ready web frameworks like Django and Rails in Clojure universe (at least right now), but programmers are using Noir and Compojure web frameworks.
You can also deploy your Clojure web apps on Heroku platform.

Clojure is highly rewarding but the learning curve is really steep. Are you ready to learn functional programming (assuming you aren't familiar)? to live out side the OOP world?

Python is the safe side: it is mature, tons of books, many web frameworks, huge knowledge pool and easy to learn.

So the decision is really yours.

share|improve this answer
    
I've checked out Clojure lately and I think that it is the one that suits my needs the most! Thanks for the advice! –  Adam Arold Jul 11 '12 at 10:56
add comment

Lisp is the language you hear when standing close and listening to the voices coming from the ivory towers. Other languages, such as PHP, might not be as elegant or powerfull, but they are like a common tongue, easy and forgiving.

While Lisp has influenced many languages, it never made it to mainstream. Why? Because many developers didn't understand the concepts of the language, to them it seemed rather obscure. Lisp is hard to understand for the vast masses of developers. Have you ever seen a job description requiring Lisp as a programming language? I haven't. "Why" you ask? Because it's hard to maintain and read for many people. In Lisp, you can much more often not tell immediatelly what an expression is doing by simply looking at it. It lacks a certain kind of simplicity, that's why it never became common tongue.

Nevertheless, Lisp has had an impact on many languages. I do recommend learning it for academical purposes. It widens your mental borders so you can often think about problems from a different point of view. However, I wouldn't recommend using it for web applications, unless you're carrying out a feasibility study for a university. It's lacking support in tools and libraries compared to the other options. If you want to acquire practical skills that will eventually yield some money and can be presented on your resumee, then by all means pick Python. You'll benefit from Lisp as well but it's less practical and more academic in nature, although your overall programming style might benefit from it.

Also, there's a renaissance of functional languages these days. You could also look into F# for .NET or Scala on the JVM if you want to pick up some functional concepts.

So make your choice. If both were real languages, which of these would you rather learn: Latin/Ancient Greek or French/German/Italian/Spanish/Chinese/Arabic?

share|improve this answer
    
I've seen a job advertising lisp in the Chicago area -- not only that, they would hire you without experience and train you. I so wanted that gig, but the commute would've killed me. I will admit, however, I think that's nearly the only ad I've seen over many years. –  Bryan Oakley Aug 11 '11 at 14:17
    
Ok what I will do: I will learn LISP and Python too, but I will use Python, because the reasons you and others mentioned above. Thanks for the clarification. –  Adam Arold Aug 18 '11 at 12:45
add comment

Given a choice between common lisp and python, the best pragmatic advice I can give is learn python. While the technologist in me thinks everyone who programs should learn lisp, I don't think learning it will help you "speed up [your] work".

If you learn lisp, I believe it will make you a better programmer in the long run. However, learning lisp for the reasons you state won't get you any closer to your immediate goals IMO. If you want a practical, pragmatic solution, learn Python. There simply aren't enough tools or opportunities to use lisp to help you in your day-to-day tasks unless you day-to-day tasks involve customizing emacs.

On the other hand, if you have time to study and learn, and are willing to put up with the ramifications of your choice (a dearth of tools, harder to find co-workers who get lisp, etc), go with lisp. It really is a terrific language.

share|improve this answer
add comment

If you have no time pressure, use Lisp. Learning Lisp will change the way you view Python (and every other language you know), but learning Python won't change the way you view Lisp (if you knew it). Lisp is more than a new tool in the toolbox. It's a new way of thinking.

While you're at it, take a look at Factor or another concatenative language. Concatenative languages are amazing for teaching you how to think in combinators. Learning a concatenative language will change the way you view all other languages.

Finally, exercise your right brain. The formalism of programming languages forces us to over-use our left brain for problem solving. Activate your right brain to access another game-changing paradigm shift.

share|improve this answer
    
"Learning Lisp will change the way you view Python (and every other language you know), but learning Python won't change the way you view Lisp (if you knew it).": Very true. +1. –  Giorgio May 19 '13 at 12:51
add comment

I would recommend using Lisp if you are a self-motivated person that is amenable to working up your own libraries of code over long periods of time, enjoys pushing the limits of your language, and don't mind the occasional hitch in configuration. If you are self-employed, it's likely to be a productivity booster over the long run due to its macro features.

Python is not as flexible, as fast, or as powerful. It's nearly trivial to learn compared to many other languages. It is very Blubby, in fact. It has wide support, it is the fad language du jour, and has a ton of libraries. It's probably a bit better if you have to work with people who complain about learning new languages.

If I was reviewing for hire someone who was good in a Lisp compared to someone who was good in Python, I would immediately presume the Lisp person was a better programmer & computer scientist than the Python person (all other things being equal).

I am atrociously biased, I'm sure.

share|improve this answer
    
Biased or not I see your point! –  Adam Arold Aug 15 '11 at 9:22
add comment

If you want to emphasize what Paul Graham was talking about, I would advocate in favor of Lisp. The difference in approach and mindset espoused by the Lisp family of languages has far more potential to have an impact on you as a programmer on the whole, because of the encouragement to think differently. And while I haven't done so myself, it looks like web development in Lisp is pretty well supported: See this question over at SO.

Python is a great language, and I'm not at all going to knock it. There are plenty of good web frameworks and tools for Python, and it will be easier to find people who are already familiar with it, when you need to.

Ultimately, because of the current environment, choosing Lisp seems to always come down to a question of "Do you want to use what you want, or do you want to use what the industry already uses?" What's your answer to that question?

share|improve this answer
add comment

Lisp is just a tool, just like every other language. Does it have useful features, sure. At the same time, it is possible to have the same output with just about any other language, it just may take more time and code. The main problem with Lisp is that you'll HAVE to get, at least, VPS hosting, as there isn't a shared host (that I know of) that supports any variety of Lisp on their platform.

One thing I would suggest is, that since you are a Java programmer, take a look at Groovy ( or even Scala). They will allow you to use your Java libraries and APIs and will provide an increase in productivity.

share|improve this answer
    
VPS is not a problem because my ideas won't work with shared hosting either. –  Adam Arold Aug 11 '11 at 14:37
add comment

I don't know a ton about Lisp other than its origins. What I know about Python is this:

5 minutes after the first flying saucer lands, the Python community will have put together something for interfacing with its I/O systems.

Also, coming primarily from JavaScript, I found Python a very natural fit. Perhaps the converse might be true.

Also, Django is pretty much the framework to imitate nowadays.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.