read


read
or learn more

All in the family

Apr 6, 2011

I’ve been thinking lately how useful it is to classify Clojure as “a Lisp”. I suppose doing so provides a basis for minimal information: macros and uh…. parentheses. The problem is that neither is unique to, nor emblematic of the Lisp family of languages. Lisp is the only family of language that is tied so strongly with its variants. It’s now strange to me that I would have had no problem saying “Clojure is my favorite Lisp”, but would never think to say any of:

  • Ruby is my favorite Smalltalk
  • C is my favorite ALGOL
  • Mozart is my favorite Prolog
  • Haskell is my favorite KRC
  • Scala is my favorite OCaml
  • Factor is my favorite Forth
  • Io is my favorite Self

These types of classifications appear silly to me. So what makes Lisp different?

:f

13 Comments, Comment or Ping

  1. I think it’s that Lisp is the most alien-looking of all the languages. The whole “no syntax, only S-expressions” thing puts the Lisps in a class all their own.

  2. Paul (OhPauleez) deGrandis

    I think it really comes down to homoiconicity (and to a lesser degree, functional programming and multi-dispatch).

    To me when someone says, “it’s a Lisp,” what I’m hearing is, “It’s a homoiconic language, using lists created by parenthesis to structure code like a tree, offering easy metaprogramming and DSL creation via macros and higher order functions. The language itself is either completely or mostly functional, and there’s an easy way to perform some sort of multi-dispatch call.”

    But I agree with you, these sorts of comparisons are sort of silly.

  3. What makes Lisp different, and what Clojure is not having to full extent actually, is unconstrained expressiveness. In an ultimate Lisp system you can apply any (and I mean any of the existing and even not yet invented) approach to solving a problem, that you think is most appropriate.

  4. nickik

    Lisp has always been discriped at a Famally of Languages not as a single Language because the shared some features. Clojure has them so its a lisp.

    I think its importend that Clojure learned from all the lisp that came befor it. People should know that.

  5. @nickik All of the languages listed above share some features with their ancestor languages. I’m sure you’re right that sharing plays a role, but I don’t think it’s primary.

  6. Lisp has a tradition of removing boundaries rather than adding features. Lisp has a tradition of not focusing on complicated syntax. Lisp has a tradition of having had most things other languages reinvent and celebrate as new, while mostly being underestimated.

    And of course, the Lisp-community has a tradition of being arrog^H^H^H^H^Hproud because of this. Thus, everybody creating some language basing on these ideas wants to call it “Lisp” – in the end, that is a good advertisement.

    Still, even though I do not like Clojure, I think the basic Ideas are there to call it “Lisp”. Difrerently from, say, Liskell (which nobody will seriously consider as a Lisp, as it is not even thought to be one).

  7. This is like the question, “is Scheme a Lisp?”, or more generally, “what constitutes a Lisp?”

    The answer is so elusive that I suspect the question is unanswerable. Every proposed definition I have encountered has been easily startled, retreating even at the sight of a raised eyebrow, let alone a serious analytical interrogation. Yet some survive longer than others, like angels precariously balancing on the head of a pin might.

    I’m content with taking a broad, diffused view of lispy languages, and accepting that there may be inconsistencies at the edges of the distribution. It’s probably ultimately a subjective, aesthetic judgement.

    “Clojure is a Lisp” sounds fine to me. But I’m also comfortable saying, “Scheme is a Lisp”, “Ruby is a Smalltalk”, “C is an ALGOL”, and so on. :-)

  8. I don’t think we can have universal definitions, but here are the ones i use in my head:

    Strong definition of a lisp dialect: basically any maclisp descendant(common lisp, emacs lisp, etc.)(this implies that a lisp dialect is more than a collection of features, but also history and traditions).

    Weak definition of a lisp dialect: language with list based homoiconic syntax.

    I consider clojure to be a functional language first, and a lisp dialect second(only by the weak definition), as it is sufficiently different from the “classic” lisps. I find this distinction useful, because if we let ourselves use a term too loosely, it starts to loose its meaning, and suddenly everybody and C++ is a lisp dialect. Or maybe I’m just a pedantic dweeb, you decide.

  9. Factor as a favourite Forth actually makes a lot of sense to me.

  10. Simon Hawkin

    Saying “clojure is a lisp” is like saying “a tree is a graph”. Part of the family.

    We don’t talk about “an algol” any more because the original Algols (’60, ’68) have faded from the memory. More so than Lisp, anyway.

  11. I think there is a notion that the difference between Lisps (even more so than languages of other families) is only skin deep, and that you can write some macros and functions to evaluate one form of Lisp in the context of another.

    Or, in other words, that the difference is only in what the first symbol in a list means, whereas this is not true for members of other language families.

    Of course, that may be great as an Ur-Lisp concept, but it breaks down when you have differences like dynamic vs. lexical scoping, fexprs, concurrency, etc.

    I would venture that Clojure has more syntax than most Lisps what with the #{}, {}, [], #(), @, etc. so I would think that even more so, this Ur-Lisp notion breaks down.

  12. One could certainly argue that C has inspired a similar level of recognition. C++, C#, and Objective C all even use it in their names, and Java is often classified as a C-like language. And one could argue Lisp (as opposed to Common-Lisp) doesn’t really describe a specific language, but rather the family of languages including Common-Lisp, Scheme, and of course Clojure.

  13. I am now obsessed with finding an X for which “X is my favorite X” is a non-ironic answer.

Reply to “All in the family”