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:19

complicated syntax??

The syntax for lisp is incredibly simple.

Killer app written in lisp: emacs. Lisp will allow you to extend emacs at will to do almost anything you can think of that an editor might do.

But, you should only learn lisp if you want to, and you may never get to use at work ever, but it is still awesome.

Also, I want to add: even if you find places where lisp will make sense, you will probably not convince anyone else that it should be used over java, c++, c#, python, ruby, etc.

查看更多
虎瘦雄心在
3楼-- · 2019-03-07 20:20

In response to @lassevk:

alt text

查看更多
霸刀☆藐视天下
4楼-- · 2019-03-07 20:21

I can't answer from first-hand experience but you should read what Paul Graham wrote on Lisp. As for the "killer-app" part, read Beating the averages.

查看更多
唯我独甜
5楼-- · 2019-03-07 20:22

Any language looks a lot harder when one doesn't use the common indentation conventions of a language. When one follows them of Lisp, one sees how it expresses a syntax-tree structure quite readily (note, this isn't quite right because the preview lies a little; the r's should align with the fns in the recursive quicksort argument):

(defun quicksort (lis) 
  (if (null lis) 
      nil
      (let* ((x (car lis)) 
             (r (cdr lis)) 
             (fn (lambda (a) 
                   (< a x))))
         (append (quicksort (remove-if-not fn 
                                           r)) 
                 (list x)
                 (quicksort (remove-if fn 
                                       r))))))
查看更多
你好瞎i
6楼-- · 2019-03-07 20:22

Complicated syntax? The beauty of lisp is that it has a ridiculously simple syntax. It's just a list, where each element of the list can be either another list or an elementary data type.

It's worth learning because of the way it enhances your coding ability to think about and use functions as just another data type. This will improve upon the way you code in an imperative and/or object-oriented language because it will allow you to be more mentally flexible with how your code is structured.

查看更多
够拽才男人
7楼-- · 2019-03-07 20:24

I found that learning a new language, always influences your programming style in languages you already know. For me it always made me think in different ways to solve a problem in my primary language, which is Java. I think in general, it just widens your horizon in term of programming.

查看更多
登录 后发表回答