Thread: Why should I learn Lisp?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  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
    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?

  4. #4
    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.

  5. #5
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by Yarin View Post
    Forth is the engineer's equivalent.
    Since reading this, I went and checked out Forth and want to use it more and more every time I look at it. I've got an HP calculator that uses the RPN notation (which I love), so at least having a Forth prompt on my computer seems appealing.

  6. #6
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    Quote Originally Posted by Epy View Post
    Since reading this, I went and checked out Forth and want to use it more and more every time I look at it. I've got an HP calculator that uses the RPN notation (which I love), so at least having a Forth prompt on my computer seems appealing.
    One of my favourite games, Starflight, was written in Forth.

    Currently, OpenFirmware and OpenBIOS supports device drivers/firmware written in Forth. Well, FCode, a bytecode version.

  7. #7
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    Quote Originally Posted by Epy View Post
    Since reading this, I went and checked out Forth and want to use it more and more every time I look at it. I've got an HP calculator that uses the RPN notation (which I love), so at least having a Forth prompt on my computer seems appealing.
    Speaking of smug.... (I have a 50g and a 35s, and I love them both).

    Quote Originally Posted by Yarin View Post
    Attract smug users.
    I like this, but I thought it was C that attracted smug users, being the system language for UNIX:

    Dilbert Comic Strip on 1995-06-24 | Dilbert by Scott Adams

    That is probably my favourite Dilbert strip.

  8. #8
    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... :-)

  9. #9
    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.

  10. #10
    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.

  11. #11
    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!!!!

  12. #12
    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... ;-)

  13. #13
    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?

  14. #14
    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

  15. #15
    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.

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