3 ms·
> well, no where can you assume TCO. (recur ...) Is an ugly hack. Yes in CL you can assume TCO from good implementations. You know you can add vector/map what
by mrottenkolber 13y ago
> well, no where can you assume TCO.
(recur ...) Is an ugly hack. Yes in CL you can assume TCO from good implementations.
You know you can add vector/map whatever syntax to CL in like 50 loc? Are you seriously saying that syntactic sugar is in any way relevant to anything? Let alone an important feature of Clojure? Thats just sad.
> car and cdr are neat, and even useful in combination,
Actually wether you call them car cdr first rest or whatever, it's actually about CONS or call it a pair if you like. A very simple but infinitely powerful datatype. This is the first thing I teach when I teach programming for a very good reason.
- hga 13y agoUgly hack ... but maybe a useful one? In that explicitly requesting TCO avoids certain classes of errors? (I don't know on balance, haven't tried TCO in Clojure in anger, and I experience enough value in being in the JVM ecosystem that it's a price I'm in theory willing to pay for now.) The problem with CL is that you can't assume it in every major implementation. Although I just found this page which paints a fairly good picture: http://0branch.com/notes/tco-cl.html http://0branch.com/notes/tco-cl.html "The following implementations were found to provide full TCO: CMUCL SBCL CCL Allegro LispWorks …only optimise self-calls in tail position: CLisp GCL ECL (when explicitly compiled) …neither: ABCL Back to me: and CL is so big that "non-major" ports are of much less interest. As for vector, map and set syntax, that was explicit mentioned as being a surface thing. The real special sauce is in how they've been unified with lists, especially under the hood. As for your last point, I see great value in all that in the LISPs, although I of course prefer Scheme. But I also see great value in the "Lisp" (LISt Processing no longer the alpha and omega) in what Clojure is doing."
- ScottBurson 13y ago"A CONS is an object that cares." -- Bernie Greenberg
- hga 13y agoWhich is followed by: "It cares about its CAR and its CDR." Then as I recall he went to the blackboard. Still trying to find a copy of his MIT IAP Lisp course notes (haven't tried very hard yet); they and his delivery of them were very very good. At the same time Jeff Schiller (JIS) would give a short neat talk on how macros worked and why they were neat.