Yeah, cons is like malloc, except that the object it creates is automatically memory managed / garbage collected. There is no corresponding "free" call. Actually, that means cons is not like malloc.
Clojure takes advantage of being fully managed code
Do you realize that Lisp uses automatic memory management (just like the JVM or CLR)?
Why are there no Fortran machines or Algol Machines or C machines?
The `cons` cell is a raw memory structure, just one step removed from assembly and originally accessed directly in machine code with `car` and `cdr`. It's associated symbol is literally a pointer directly to a memory location. It's so close to assembly language that thirty years ago implementing it directly in hardware was considered practical.
It's associated symbol is literally a pointer directly to a memory location
A cons is not "raw memory"; it is a typed data structure, and in Common Lisp it is even considered an OOP object of the cons class. It is equivalent to having a data structure called "pair" that can hold two things.
All memory-allocated data structures ultimately have an address of some kind, so this whole discussion about pointers is utterly meaningless. For that matter, arrays, strings, and basically every known memory data structure is "raw" too. After all, they have an address.
The fact that cons/car/cdr can be implemented cheaply in hardware stems from the fixed and small size of cons. That doesn't make it somehow inferior.
By the way, the Java stuff is implemented in hardware too, does that make Java inferior? http://en.wikipedia.org/wiki/Java_processor
> Although Clojure still has a `cons` it has been replaced by `seq` as the fundamental abstraction.
Common Lisp has lists and sequences as abstractions. But it does not take away the low-level operations.
I'm not making a case that Clojure is better than other Lisps - getting rid of `cons` and relying on the JVM has makes typing more critical in an environment that retains a degree of type opacity typical of dynamic type systems.
See SERIES in Common Lisp. http://series.sourceforge.net
> At a higher level the abstraction facilitates differentiating a breadth first search tree from a depth first search tree as types of data structures
Typically used as CLOS libraries in Common Lisp.
> getting rid of `cons`
That's caused because Clojure is implemented in something else and doesn't go very deep.
Common Lisp goes deeper because it is it's own implementation language. Much of the implementations are written in Common Lisp itself (compiler, parts of the runtime, ...). On something like the MIT Lisp Machine even the garbage collector was written in Lisp.
Lisp is reflective building material + machineries + some pre-build stuff.
Clojure is more like pre-built stuff on top of some other infrastructure.
All that said, what Clojure shares with Common Lisp, is that practical programming issues come first and that theology comes last - in the end all questions of doctrine can be resolved in the mathematics of the lambda calculus.
Clojure and Common Lisp express the same attitude toward programming and programmers. Their attitude toward academic computer science is perhaps a bit different, largely for reasons of history: Lisp has one, Clojure doesn't.
> Moreover, the last standardization was grounded in the previous effort and that was before GNU and when dedicated hardware looked like the future.
Hmm, Common Lisp was developed to run efficiently on stock hardware from day one. Motorola 68k, Intel 86, then SPARC, POWER, MIPS, ...
> Clojure and Common Lisp express the same attitude toward programming and programmers.
They don't.
Common Lisp was developed as a standard Lisp language for application development (in domains like expert systems, cad systems, etc.) which favors giving the programmer maximum freedom and makes little assumption on what it is running.
Example: Common Lisp comes with minimal expression syntax and an extension mechanism.
Clojure was originally developed to bring a Lisp to the JVM, which integrates with Java, reuses parts of Java and favors things like functional or concurrent programming.
Example: Clojure comes with more complex expression syntax and no extension mechanism.
I stated that Common Lisp was developed before the commercial internet & args.
symbolics.com, Lisp Machine manufacturer, first ever .com domain. In 1985.
bbn.com, Lisp Machine developer, second .com domain in 1985.
Thinking Machines, Parallel AI Machine for Lisp, third .com domain in 1985
MCC, had hundreds of Lisp Machines, fourth .com domain in 1985
DEC, co-sponsor of CL, fifth .com domain in 1985
Xerox, Lisp Machine developer, seventh .com domain in 1986
...
I'd say all the companies who participated in the CL development from 1981-1994 were commercial entities on the Internet. All of them offered a variety of network services in their operating systems: mail, chat, terminal, X11, file sharing, remote printing, remote booting, name server, ...
http://en.wikipedia.org/wiki/List_of_the_oldest_currently_re...
All were having networked machines and networked operating systems.
However, I am in no way implying that the creation of the .com TLD is the resolution of the phrase "commercial internet" in ordinary language & args.
You wrote:
> I'm not advancing a moral argument. I'm advancing an historical one. It's an amoral fact that Common Lisp was standardized more than twenty years ago
It was standardized 1994 with the ANSI CL standard. Exactly 20 years ago.
> - before the commercial internet,
Commercial ISPs started around 1989.
> wide availability of systems suitable for distributed computing,
Distributed computing was available earlier.
> and even before it was clear that GUI's would win the war.
Lisp supported GUIs much earlier. The Common Lisp standards group had even a subgroup for this topic.
Anyway it's not clear what this all means, when CL was developed. Scheme, Objective C, C, C++, Smalltalk, were all developed before Common Lisp. What follows from that?
>Clojure takes advantage of being fully managed code
>writing a macro is the sort of thing hubris drives lazy impatient Lispers to do
The ignorance of Clojure programmers is really incredible.
Although Clojure still has a `cons` it has been replaced by `seq` as the fundamental abstraction. Clojure takes advantage of being fully managed code and in a sense is as much a Lisp as C# is a C [if we were inclined to think of C as a genre, else Algol?].
It seems this, combined with a formally incorporating a DSL of the kind a experienced Lisper (such as Hickey) might create for writing programs gives Clojure it's syntax: e.g. [x y] is syntactically like a quoted list and writing a macro is the sort of thing hubris drives lazy impatient Lispers to do. In special forms [x y] is like a different more complex macro, but again the sort of thing people would write for themselves. In other Lisps the ad hoc nature of such macros however makes other people's code notoriously hard to follow.