Why should I learn Lisp? [closed]

2019-03-07 19:45发布

I really feel that I should learn Lisp and there are plenty of good resources out there to help me do it.

I'm not put off by the complicated syntax, but where in "traditional commercial programming" would I find places it would make sense to use it instead of a procedural language.

Is there a commercial killer-app out there that's been written in Lisp ?

29条回答
迷人小祖宗
2楼-- · 2019-03-07 20:42

To add to the other answers:

Because the SICP course (the videos are available here) is awesome: teaches you Lisp and a lot more!

查看更多
ゆ 、 Hurt°
3楼-- · 2019-03-07 20:43

Lisp is a large and complex language with a large and complex runtime to support it. For that reason, Lisp is best suited to large and complicated problems.

Now, a complex problem isn't the same as a complicated one. A complex problem is one with a lot of small details, but which isn't hard. Writing an airline booking system is a complex business, but with enough money and programmers it isn't hard. Get the difference?

A complicated problem is one which is convoluted, one where traditional divide and conquer doesn't work. Controlling a robot, or working with data that isn't tabular (languages, for example), or highly dynamic situations.

Lisp is really well suited to problems where the solution must be expandable; the classic example is the emacs text editor. It is fully programmable, and thus a programming environment in it's own right.

In his famous book PAIP, Norvig says that Lisp is ideal for exploratory programming. That is, programming a solution to a problem that isn't fully understood (as opposed to an on-line booking system). In other words: Complicated problems.

Furthermore, learning Lisp will remind you of something fundamental that has been forgotten: The difference between Von Neumann and Turing. As we know, Turing's model of computation is an interesting theoretical model, but useless as a model for designing computers. Von Neumann, on the other hand, designed a model of how computers and computation were to execute: The Von Neumann model. Central to the Von Neumann model is that you have but one memory, and store both your code and your data there. Notice carefully that a Java program (or C#, or whatever you like) is a manifestation of the Turing model. You set your program in concrete, once and for all. Then you hope you can deal with all data that gets thrown on it.

Lisp maintains the Von Neuman model; there is no sharp, pre-determined border between code and data. Programming in Lisp opens your mind to the power of the Von Neumann model. Programming in Lisp makes you see old concepts in a new light.

Finally, being interactive, you'll learn to interact with your programs as you develop them (as opposed to compile and run). This also change the way you program, and the way you view programming.

With this intro I can finally offer a reply to your question: Will you find places where it outshines "traditional" languages?

If you are an advanced programmer, you need advanced tools. And there is no tool more advanced than Lisp. Or, in other words: The answer is yes if your problems are hard. No otherwise.

查看更多
【Aperson】
4楼-- · 2019-03-07 20:43

I agree that Lisp is one of those languages that you may never use in a commercial setting. But even if you don't get to, learning it will definitely expand your understanding of programming as a whole. For example, I learned Prolog in college and while I never used it after, I gave me a greater understanding of many programming concepts and (at times) a greater appreciation for the languages I do use.

But if you are going to learn it...by all means, read On Lisp

查看更多
祖国的老花朵
5楼-- · 2019-03-07 20:43

If you have to ask yourself if you should learn lisp, you probably don't need to.

查看更多
走好不送
6楼-- · 2019-03-07 20:43

Syntax is irrelevant, readability is not!

查看更多
登录 后发表回答