Thread: Why should I learn Lisp?

  1. #1
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665

    Why should I learn Lisp?

    In another online discussion about programming, it was mentioned that Lisp would be a good language to better understand CS as a concept and algorithms in general.

    I googled around a bit and I couldn't find any overwhelmingly good evidence.

    So, what is Lisp and why should I care about it? What does it do better than C/C++?

    I've researched that Lisp is NOT functional and overall, its syntax seems far more confusing to me than something like C. I've heard it's really good for AI and that the Lisp code is its own abstract syntax tree so I guess it's more what you see is what you get than C or C++ would be.

    So aside from the virtue of learning a new language for the sake of broadening my horizons, what does Lisp bring to the table that makes it awesome?

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by MutantJohn View Post
    So, what is Lisp and why should I care about it?
    Lisp is an extremely minimal language, and appeals to lots of mathematical academic minimalists. Forth is the engineer's equivalent.


    Quote Originally Posted by MutantJohn View Post
    What does it do better than C/C++?
    Attract smug users.


    Quote Originally Posted by MutantJohn View Post
    I've researched that Lisp is NOT functional and overall
    Who cares. Functional is buzzword. A language being "functional" says nothing about it's value.


    Quote Originally Posted by MutantJohn View Post
    its syntax seems far more confusing to me than something like C.
    Once you get over all the parentheses, it's not so bad.


    Quote Originally Posted by MutantJohn View Post
    I've heard it's really good for AI and that the Lisp code is its own abstract syntax tree so I guess it's more what you see is what you get than C or C++ would be.
    Yes, languages like that are homoiconic. However, the claim that it's good for AI is an urban myth. Is Watson or Siri written in Lisp? No. Being homoiconic counts for nothing when the AST is not suitable for your AI's internal structure.


    Quote Originally Posted by MutantJohn View Post
    So aside from the virtue of learning a new language for the sake of broadening my horizons, what does Lisp bring to the table that makes it awesome?
    Macros! What makes Lisp unique is it's macros, which are essentially "open subroutines". You can do a lot of cool things with them.
    Though, in my personal opinion, more often than not, they make code harder to maintain, and don't let you do anything that you need to do that you can't already do with HOFs. So I don't miss their absence from other languages.
    Last edited by Yarin; 01-26-2015 at 07:17 PM.

  3. #3
    Lurker
    Join Date
    Dec 2004
    Posts
    296
    Quote Originally Posted by MutantJohn View Post
    In another online discussion about programming, it was mentioned that Lisp would be a good language to better understand CS as a concept and algorithms in general.

    I googled around a bit and I couldn't find any overwhelmingly good evidence.

    So, what is Lisp and why should I care about it? What does it do better than C/C++?

    I've researched that Lisp is NOT functional and overall, its syntax seems far more confusing to me than something like C. I've heard it's really good for AI and that the Lisp code is its own abstract syntax tree so I guess it's more what you see is what you get than C or C++ would be.

    So aside from the virtue of learning a new language for the sake of broadening my horizons, what does Lisp bring to the table that makes it awesome?
    From personal experience Lisp is good to know if you want to go into the more theoretical side of computer science. That was true 15 years ago at least, it might not be true any more.

    For example, being able to at least read Lisp, or even better Scheme, is a prerequisite for reading SICP... :-)

  4. #4
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Yarin View Post
    Attract smug users.
    I don't know why, but this made me laugh pretty hard. Lisp has a reputation for smug and arrogant users, but C and C++ have their own fair share of smug users. Probably more of them than Lisp, in fact, simply because of the market penetration of the languages.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  5. #5
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Quote Originally Posted by Elkvis View Post
    I don't know why, but this made me laugh pretty hard. Lisp has a reputation for smug and arrogant users, but C and C++ have their own fair share of smug users. Probably more of them than Lisp, in fact, simply because of the market penetration of the languages.
    I was gonna say, Yarin's comment really made me laugh too.

  6. #6
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Pretty sure anyone who's fairly proficient at a language tends to be smug and arrogant.

    I don't really think that learning Lisp gives any real advantages. I had learned a little bit of programming in the distant past and then really learned to program using AutoCAD's version of Lisp. I enjoyed the spoils of built-in lists and functional programming, but these things are in Python and other languages as well.

  7. #7
    Lurker
    Join Date
    Dec 2004
    Posts
    296
    Quote Originally Posted by Epy View Post
    Pretty sure anyone who's fairly proficient at a language tends to be smug and arrogant.

    I don't really think that learning Lisp gives any real advantages. I had learned a little bit of programming in the distant past and then really learned to program using AutoCAD's version of Lisp. I enjoyed the spoils of built-in lists and functional programming, but these things are in Python and other languages as well.
    Yeah, Lisp probably doesn't have the relevance it once might have had.

    My suggestion is to only learn Lisp if one thinks it can teach something valuable. It is the same for any language really, there are 2 reasons to pick up a new language, either because you need it for work or one thinks that learning it will teach a new way to look at programming and/or problem solving. It doesn't have to be a new language to learn new ways to look at problem solving though, there are several languages that can do both OOP and functional programming for example. But one could argue that some languages are more "pure" for functional programming or OOP programming or what not.

    Usually it is better to not buy into the hype though. My advice to the OP is to not learn Lisp until/unless he sees a really compelling reason to do so.

    I still think that one reason to learn Lisp is to actually read SICP. It is a good read. It is one of those books that you either love or hate though...

    EDIT: There is a third reason to learn a new language, because it is fun.

  8. #8
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Hmm... Interesting. Well, I guess I won't dive into Lisp then. It doesn't sound particularly fun nor will I be paid to learn it. I'd rather just get better at PHP. That's right, I said it: PHP!!!!

  9. #9
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    I liked using Scheme to do some quick stuff in the past. I also give learning Scheme some credit for improving my capabilities in meta-programming with C++ templates.

    If you though don't have a reason, why even look for one? If you need to learn LISP later, you can just learn at the time.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  10. #10
    Lurker
    Join Date
    Dec 2004
    Posts
    296
    Quote Originally Posted by MutantJohn View Post
    Hmm... Interesting. Well, I guess I won't dive into Lisp then. It doesn't sound particularly fun nor will I be paid to learn it. I'd rather just get better at PHP. That's right, I said it: PHP!!!!
    Ugh...

    I will really have to struggle to keep quiet... MUST KEEP MY MOUTH SHUT... ;-)

  11. #11
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by MutantJohn View Post
    I'd rather just get better at PHP. That's right, I said it: PHP!!!!
    PHP is not inherently a bad language. I think the main reason why PHP has such a bad reputation is because it seems that it is the norm for PHP programmers to really suck at programming, and the PHP community seems to do little to encourage better quality PHP code. It is certainly possible to write good code in PHP, and there are programmers who do.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  12. #12
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    I agree with Elkvis. I'd say that a fair amount of PHP programmers are basically script kiddies.

  13. #13
    Lurker
    Join Date
    Dec 2004
    Posts
    296
    Quote Originally Posted by Epy View Post
    I agree with Elkvis. I'd say that a fair amount of PHP programmers are basically script kiddies.
    Define what you mean by "script kiddies"?

    My view is that there are probably more programmers with less understanding writing PHP code than most other languages. I think that that is due to the fact that it is pretty easy to go from knowing nothing of PHP to a "finished" web page hosting dynamic content in a week or so. If you define finished as "showing content to the user".

    From my experience working in the security field I must say that I have yet to review PHP code that doesn't contain some form of latent security issue due to an misunderstanding of how PHP works or due to quirks in the language. I'm not saying all such faults are exploitable though, just latent defects. (Yes, the same could be argued for C code as well. People seem to be unable to understand/read documentation or they are too lazy to use APIs correctly.)

    The problem with PHP code is that the defects are usually easier to find and exploit.

  14. #14
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    As in, someone who Googles how to do something in PHP (or whatever other web language) and copies code verbatim from sites with examples, then makes a horrible spaghetti mess trying to bring all the copied examples together.

  15. #15
    Lurker
    Join Date
    Dec 2004
    Posts
    296
    Quote Originally Posted by Epy View Post
    As in, someone who Googles how to do something in PHP (or whatever other web language) and copies code verbatim from sites with examples, then makes a horrible spaghetti mess trying to bring all the copied examples together.
    That seems to be in line with what I think about PHP programmers as well... :-)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lisp Help
    By anirban in forum Tech Board
    Replies: 1
    Last Post: 01-15-2012, 04:14 PM
  2. Help on LISP please?
    By ssharish2005 in forum Tech Board
    Replies: 1
    Last Post: 02-08-2008, 10:12 AM
  3. Lisp
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-26-2003, 12:41 PM
  4. Lisp
    By MethodMan in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 11-18-2002, 04:41 PM
  5. Lisp
    By Lechugas in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-18-2002, 12:21 PM