2 ms·
But languages like Clojure, Hy or Racket are not a Lisp. They are Lisp-derived/inspired/... languages. That's also why they don't have Lisp in their name. OTOH
by lispm 13y ago
But languages like Clojure, Hy or Racket are not a Lisp. They are Lisp-derived/inspired/... languages. That's also why they don't have Lisp in their name.
OTOH Lisps like Emacs Lisp, Common Lisp, ISLisp, and some others are still carrying the core of the first Lisp. Basically you can run Lisp 1.5 code in those without many changes.
Just like Java is not the new C. OTOH languages like C++ and Objective C still support much of C. You can port C to C++ easily.
Over the history many other languages have been trying to replace Lisp: ML (functional programming), Dylan (object-oriented programming), Logo, Scheme, ... all tried to modernize/improve Lisp. Now it is Clojure and some other languages.
Still there are core Lisp languages which carry on the genes.
But not Clojure:
Clojure 1.5.0-RC2
user=> (car '(1 2))
CompilerException java.lang.RuntimeException: Unable to resolve symbol: car in \
this context, compiling:(NO_SOURCE_PATH:3:1)
What?
user=> (append '(1 2) '(3 4))
CompilerException java.lang.RuntimeException: Unable to resolve symbol: append \
in this context, compiling:(NO_SOURCE_PATH:4:1)
What?
user=> (assoc 'foo '((foo . 3)))
ArityException Wrong number of args (2) passed to: core$assoc clojure.lang.AFn\
.throwArity (AFn.java:437)
user=> (atom 'foo)
#<Atom@2285af04: foo>
???
Does not look like it supports Lisp processing as defined by McCarthy:
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.91.4527&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.91....
Additionally the Java error messages are especially irritating. I enter Clojure code and get Java error messages.
Compare that with a real Lisp:
bash-3.2$ java -jar abcl.jar
Armed Bear Common Lisp 1.1.1
Java 1.7.0_25 Oracle Corporation
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization completed in 0.628 seconds.
Startup completed in 1.968 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (car '(1 2))
1
CL-USER(2): (append '(1 2) '(3 4))
(1 2 3 4)
CL-USER(3): (assoc 'foo '((foo . 3)))
(FOO . 3)
CL-USER(4): (bar 10)
#<THREAD "interpreter" {6EEE1E2}>: Debugger invoked on condition of type UNDEFINED-FUNCTI\
ON
The function BAR is undefined.
Restarts:
0: CONTINUE Try again.
1: USE-VALUE Specify a function to call instead.
2: RETURN-VALUE Return one or more values from the call to BAR.
3: TOP-LEVEL Return to top level.
[1] CL-USER(5):
We even get Lisp error messages. The compiler is written in Lisp.
http://svn.common-lisp.net/armedbear/trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp http://svn.common-lisp.net/armedbear/trunk/abcl/src/org/arme...
Clojure may be a cool language, but the core of Lisp has been replaced in parts with something else. List processing is different. It's now based on 'persistent' lazy sequences...
- dragonwriter 13y ago> But languages like Clojure, Hy or Racket are not a Lisp. How are they not. Okay, I see your argument with Clojure, but how does that apply to Racket? Welcome to Racket v5.3.4. > (car '(1 2)) 1 > (append '(1 2) '(3 4)) '(1 2 3 4) > (assoc 'foo '((foo . 3))) '(foo . 3) >
- lispm 13y agoRacket has some other differences: Immutable data structures, more emphasis on Functional Programming and less on imperative programming, symbols are not that important, slightly more static and less interactive. It's basically developed from R6RS on. The Scheme community is divided about that. The R7RS under development goes a bit more back to the older spirit and style - which is also controversial.
- dragonwriter 13y agoSure, Racket has differences from CL, but I don't see how havi any of the things you mention make it "not a Lisp" . Clearly, it's not CL, but you don't seem to be making the "CL is the only Lisp" argument.
- kragen 13y agoRainer, are you seriously complaining that Clojure is not a Lisp because it spells "car" as "first", "cdr" as "rest", and "append" as "concat"? That makes as much sense as complaining that Interlisp is not a Lisp because it doesn't have FEXPR. In Clojure, your examples are spelled: (first '(1 2)) (concat '(1 2) '(3 4)) (get {:foo 3} :foo) ; or (get {'foo 3} 'foo) (symbol? 'foo) ; or (not (coll? 'foo)) And lots of things in the world irritate me for reasons that have nothing to do with whether they are Lisp or not. I'd like to point out that your examples wouldn't have worked in Lisp 1.5 either. You would have had to type, for example, CAR (QUOTE (1 2)) interactively.
- lispm 13y agoClojure does not implement Lisp lists. Just plain and simple. It may partly look like Lisp lists. But they aren't. Functions are randomly either looking compatible or not at all. ATOM does something completely different. CAR does not exist. FIRST exists, but works on persistent lazy sequences (wonderful, but it is not using Lisp-style chained cons cells). Btw., LispWorks, plain: CL-USER 23 > CAR (QUOTE (1 2)) 1 A more complex example: http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/wang.html http://www.informatimago.com/develop/lisp/com/informatimago/...