Comment by aeorgnoieang
7 years ago
It's elegant. It's (relatively) easy to write a basic parser. LISP code is readily expressible in the same basic data structures provided in the language so you get meta programming almost for free and thus extending LISP is (relatively) easy too. Whereas C feels like an abstract machine language, LISP feels like an abstract 'mathematical computation' language. It's, like all languages, a different way of thinking about computation in the same way that human languages also seem to be (at least marginally) different ways of representing or expressing thought.
And once you've come to appreciate it, jokes like "HAVE YOU READ YOUR SICP TODAY?" will be funny to you.
In terms of 'getting shit done', it's not so 'good', not that one can't get shit done with LISP, but that it's not necessary nor, given all likely real world constraints, particularly that much of, if at all, an advantage relative to other (families of) languages.
It's also historically important so there's a benefit in knowing about it and being familiar with it too. And knowing the history helps understand why people still love it, even as a lot of what was once unique or special about it can be found much more widely.
Lisp is very valuable in the concepts which it teaches; expression trees and their inherent parallelism, functions without side-effects, structured data definition, lazy evaluation.
I've been programming for about 30 years, and did a fair bit of scheme, then lisp early on. I no longer use it, and it's not a great modern language for a lot of internet or IO stuff, but as a data transformation language, few are its equal. I still apply what I learned from lisp to write better code in Java, Go, Python. It puts you into a mindset of using composition of simple functions and data structures, which will generally lead to better code in any language.
> it's not a great modern language for a lot of internet or IO stuff
I think Clojure is a great language for internet stuff and possibly great even for IO stuff too, depending on what you mean by that. The LISP-iness is probably better for the former but builtin Java interop probably goes a long way towards being pretty-good for the latter.
What exactly were you thinking-of by "IO stuff"? Graphics? Embedded systems programming? I'd think Clojure could be just as good as Java or Python for all of those, tho existing libraries aren't going to be quite as good as C/C++, and Go will probably be better-performing generally.
And there are (because of course there are) LISPs for real-time embedded systems programming:
- [nakkaya/ferret: Ferret is a free software lisp implementation for real time embedded control systems.](https://github.com/nakkaya/ferret)
Lisp is like the Latin of programming languages. Powerful, archaic, well-thought, elegant, venerable.
In what way is Latin powerful, compared to other languages? Or elegant?
I've had to learn a little Latin, because it's the root of half the English language, and I would not describe it this way at all. It's overly complex and arbitrary. The https://en.wikipedia.org/wiki/Latin_spelling_and_pronunciati... article is full of tables of exceptions. Over its lifetime, they not only couldn't agree on pronunciation, but whether it had lower-case letters, whether to put spaces between words, or which direction to write it.
C is Latin. It's revered because of its age and the the works written in it. It was in the right place at the right time. Half the world who came after tried to make their own improved version, and those improved versions are the languages that are actually popular today.
What spoken language is powerful and elegant? When I was in college, a friend was taking a language (I think it was Swahili but don't quote me on that) that was so simple students learned all of the grammar in the first semester. Everything after that was just learning vocabulary and getting comfortable with it. Turkish has a completely 1:1 mapping of letters to sounds, and perfectly regular conjugation. Korean also has an extremely consistent writing system. Any of those seem more Lisp-like to me than Latin.
> a language that was so simple students learned all of the grammar in the first semester.
Natural languages tend to be similar in complexity, which tends to increase to the bounds placed by a child's ability to learn. Languages with simpler grammar often have eg. more complex phonetic systems. For instance, mandarin is "simple" in that it doesn't have conjugations or tenses, but it's complex in that it has tones. Likewise, Turkish has vowel harmony.
> Korean also has an extremely consistent writing system.
Not only that, but the gylphs actually represent the mouth movements necessary to make the sounds. It's like that because Hangul is a relatively new writing system that was designed with discoveries in linguistics in mind, unlike English and French that have things like vestigial spellings (eg. "through"). So I'd say that Korean would be like an up-and-coming like, uh... Rust. Of course, writing systems aren't really part of a language itself: you can write any language in IPA.
Here is a powerful and elegant human language: https://en.wikipedia.org/wiki/Esperanto (although it should be said that its power is mostly hypothetical until it becomes widely used, which may be never)
1 reply →
I understand sanskrit is elegant and simple, and of course ancient, perhaps that would be a better analogy
I'd say Lisp is like Ancient Greek to Latin's C.
I think the general consensus is that it's great for "getting big shit done" – in other words, it's hard to beat for creating large, complex programs, but relatively crap for scripting or smaller tasks. I'm still kind of amazed how difficult it is to create a Lisp program that isn't hundreds of MB in size.
I created TXR/TXR Lisp to be great for scripting or smaller tasks. It has a small footprint and is free of annoying dependencies, yet feature-rich.
http://nongnu.org/txr
I released version 223 today, which marks the tenth anniversary, since the project's August, 2009 start.
Most of the Schemes (Chicken, Gambit / Gerbil, Chez, Racket at least) have a way of distributing executables that are small.
I’ve used Chicken in the past to create static binaries that were on the order of hundreds of kilobytes.
> I'm still kind of amazed how difficult it is to create a Lisp program that isn't hundreds of MB in size.
That's not true IME. No doubt SBCL binaries are large, but they start around 70 Mb and grow from there. The growth depends partly on how many shared libraries are loaded when the image is created. Commercial Lisps are supposed to be better, but I haven't used them so I can't really say.
For smaller tasks SBCL (and possibly others) support scripting using a "shebang line" of "#!/usr/bin/sbcl --script".
Sure, I'm not saying these things can't be done, just that you get the distinct feeling that it isn't how Lisp was made to work. I might have been exaggerating about size, but 70 Mb is pretty damn big for a program that might not do all that much! I haven't ever used commercial Lisps, either.
1 reply →
It's dynamically typed, so, heh, that is definitely not the general consensus.
Extending Lisp can be hard work. Take an existing Common Lisp implementation and give, say, support for continuations.
Adding the necessary syntax will not be hard, however, whereas in a in a different kind of language framework, that part will have difficulties also.
What will also be easier in Lisp is for downstream users to manage the change. For instance, maybe some code relying on the new feature can work fine with some hack that just fakes some the semantics. That can be disguised under compatible syntax.