Quote:
Originally Posted by Ensign Steve
Rest in peace and all that, but god damn lisp was the most boring and stupid language I ever did learn.
|
Did you learn Common Lisp? Which implementation? CMUCL? SBCL? Allegro? Lispworks? Corman? CLISP?
There's a lot of confusion about Lisp (especially concerning the capitalisation). There have only been two main dialects for the last 30 years: Common Lisp (or just Lisp) and Scheme. Common Lisp is supposed to be the industrial language. Scheme is the academic language. The former was standardised in the mid-80s.
I don't know what dialect of Lisp Corona688 learned, but it isn't Common Lisp or Scheme. You can't prove very much about a Lisp program, because there are no guarantees about what a piece of Lisp code will do. The language is a mess. It allows more pernicious side-effects than any other language, allowing extreme behaviour such as being able to reflect into arbitrary namespaces and rebind symbols on the fly, thereby forcing code to be recompiled and uninlined all over the place and dangerously changing a program's behaviour.
This sort of thing means that Lisp is probably the most
hackable language out there. And it has been hacked to death. Common Lisp itself was the result of standardising arcane language hacks across numerous dialects. Hackery is pretty necessary in computers that are Lisp all the way down to the machine-level (Lisp machines). But it means that guarantees and proof go out the window.
No, the folklore selling point for the elegance of Lisp lay in how easy it was to write a Lisp interpreter in Lisp. The principle data-structure is the symbolic expression, one designed by John McCarthy to represent parsed code. Parsing itself is trivial. The language barely has syntax. And besides, there is a library function "read" which will do parsing for you. After that, it's just a matter of doing a big switch statement and working out how to compose a
continuation (a first-class higher-order function, a kind of object that was for a long time unique to Lisp), and then finally throwing the continuation the identity function.
The ability to do this sort of thing means that it's very easy to write a custom Lisp interpreter and so experiment with new language features. This was called the "Art of the Metacircular Evaluator". It led to such things as Brian Smith's infinite reflective tower which went on to become the basis for reflection in many object-oriented programming languages (including Python).
This isn't a big deal anymore, as there are languages which do the metacircular stuff
much better and more sanely, and which really do allow you to prove properties of programs.