Hacker News new | ask | show | jobs
by iLemming 746 days ago
I'm not here to debate taxonomy. Rich Hickey says: "Clojure is a dialect of Lisp and shares with Lisp the code-as-data philosophy and a powerful macro system." No disrespect, but unless Alan Kay or Guy Steele come to your side and convince Rich to stop calling Clojure a Lisp, I'll be calling it that. Sorry, maybe Mr. Hickey knows better than I do about the language he created?
1 comments

"Being a Lisp" or "being a dialect of Lisp", these are two different things for me.

But even the "dialect of Lisp" actually is more like "spiritual dialect of Lisp".

Clojure was from the beginning designed with exactly ZERO backwards compatibility to Lisp. Exactly ZERO of the existing Lisp programs/libraries could work. It was even difficult to port them. It's basically a kind of "dialect" with new operators and data structures, which interprets prior concepts in new ways and mixes in new stuff.

But it was designed with compatibility to Java and the JVM -> one could not reuse existing Lisp code, but one could reuse existing Java code -> since Clojure was hosted on the Java and had integrated calling Java code. Reusing Java was more important, because the goal was to work in a Java industry. Thus there wasn't a version of Clojure on top of Lisp, only versions on top of languages/infrastructures like JavaScript or .net, because there was another source of reuse.

If we look at the above linked paper "The Evolution of Lisp", then "Evolution" actually meant "Evolution", not "Restart" -> the language evolved by improving, adding, extending, removing, ... around a core design.

Clojure was designed as a new dialect, free of the baggage from the past, with a completely fresh start. Reusing existing code or evolving an existing language was a non-goal. It was newly designed as a hosted implementation (-> the Lisp runtime was gone), it was designed with lazy data structures at its core (-> the Lisp linked lists were gone), it was an opinioned new design, based upon of what Rich Hickey liked about Lisp and what would help him to be employed as a consultant in a Java world -> by developing upon and within the Java stack of standards, tools and libraries.

And that's fine for him. Rich Hickey had his goals and succeeded with them. Other people found it useful, too.

Okay, look. My native tongue is Russian. In Russian, "being a Russian" has two forms: "Русский" and "Российский." "Ethnic Russian" and "a Resident of Russia." When translated to English, the difference gets blended, but in Russian, it still exists. We can imagine some completely imaginary English dialects in which "Lisp" would have a different meaning, can't we? We can even add some weird rules similar to "Российский Флаг" and "Русский Флаг," which would be translated depending on the context and time differently. We would have to find ways to describe "the subtle differences of 'Lisp' in different contexts." We can pretend we're talking in different dialects where "Lisp" means different things. We can create all sorts of rules and standards. But at the end of the day, for most people, Lisp is like "porn" in the sense that "if it is, you know it." I'm in that school. Clojure is a Lisp to me. Call me a religious idiot. If people can't tell the difference between Common Lisp, Lisp, and Clojure, call them idiots. I don't know, usually when I mean to say "Common Lisp" I'd say it, or I would use "CL" and people usually know what I meant. Then I don't know what we're arguing about.
I usually don't want to call people "idiots", but I would want to prevent confusion. Even though English is a Germanic language, it's not German. It's a matter of expectation. If a book title says "Lerne Deutsch" it's not meant to mean "Learn English". Same for "Learn Lisp" and "Learn Clojure". Both books usually will be about different languages. For example there was a book "The Little Lisper", for Scheme it was renamed the "The Little Schemer". People then knew that the book is using the Scheme dialect of Lisp and not Lisp itself.

Btw., even though "lernen" and "learn" are coming from a common language background (Proto German, also called Common Germanic, no joke -> https://en.wikipedia.org/wiki/Proto-Germanic_language) and here mean the same.

> I would want to prevent confusion

There's no confusion. Anyone who wants to learn Lisp can start with Emacs Lisp, Racket, Guile, Janet, Fennel, Clojure, or Common Lisp, and soon they'd know how they differ. Telling people "Oh no, Clojure is not an actual Lisp" is disingenuous. Yes, there are certain differences, but the main ingredients are there - homoiconicity, macros, REPL-driven. Sure, in some contexts, clarification is required, and usually, it is present. I have never heard anyone say something like "I actually wanted to learn Lisp, but I ended up using Clojure and never found out what 'the real Lisp' is like." When people want to specifically talk about Common Lisp, they say that. Again, I have no idea what the fuzz is about, Clojure is a Lisp. Yes, it's not Common Lisp, it's not Emacs Lisp, we know that. Most people who know just a bit about Lisps, do know that. And yet we're arguing like someone accidentally may end up using wrong Lisp and kill thousands of polar bears or something.

-> the Lisp linked lists were gone

Cons cells and linked lists are not completely gone, though:

    user=> (cons 1 (cons 2 nil))
    (1 2)
Cons cells however are somewhat limited in that the second argument to cons must be an ISeq.
and then you get this in Clojure:

  user=> (list? (cons 1 '(2 3)))
  false
  user=> (cons 1 '(2 3))
  (1 2 3)
That's "strange", isn't it? It prints as (1 2 3), but it is not a list? So there are things which print as lists, but aren't lists? What? Which also means that when we print it and read it back, it will be of a different type and list? will be true?!

  ELISP> (listp (cons 1 '(2 3)))
  t
Puh, Emacs Lisp got it right.
I just tried your first example on tryclojure.org and it returned "true":

    user=> (list? (cons 1 '(2 3)))
    true
Your example looks like Clojurescript? It is also inconsistent between variants?

  Clojure 1.11.3
  user=> (list? (cons 1 '(2 3)))
  false
Interesting! The tryclojure.org website says it's Clojure, not ClojureScript.

If it's inconsistent between variants then I'm absolutely not going to code in it...

Yes, I'm tired of Clojure fanboys recommending their language as a Lisp. It's not.
You can probably make many like minded friends in r/haskell. Just post something about Clojure and pedants most likely crawl out, saying how it is not an FP-language. :)
Not about FP; it' just that Clojure tries to be a Lisp and it fails on the simplest basic list cons'ing.

Like declaring some mini-C 'ANSI C compatible' and you can't even provide a complete but basic stdio.h header.