Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Clojure constructs don't allocate memory - okay...

> 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.



Sorry for not writing more clearly. Because Clojure does not need to allocate memory, it can use `seq` as its fundamental constructor. A `seq` is anything that implements `first` and `next`, it's a higher level abstraction than `cons` because it frees up `()` and `nil` from `car` and `cdr` [or `first` and `rest`]. At a higher level the abstraction facilitates differentiating a breadth first search tree from a depth first search tree as types of data structures (though I'm not necessarily advocating the idea). Sure it could be done in a traditional Lisp but the best case sausage factory is probably less sanitary.

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.


> A `seq` is anything that implements `first` and `next`, it's a higher level abstraction than `cons` because it frees up `()` and `nil` from `car` and `cdr` [or `first` and `rest`].

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.


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 - before the commercial internet, wide availability of systems suitable for distributed computing, and even before it was clear that GUI's would win the war. Moreover, the last standardization was grounded in the previous effort and that was before GNU and when dedicated hardware looked like the future. And that first standardization was the result of peace talks between tribes that had developed customs over the previous two decades (or thereabouts).

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.


You'll try a partial rewrite of the history. Common Lisp was developed over the Internet. The participating groups were all nicely networked and had lots of distributed systems. XEROX PARC and MIT pioneered the GUI. Lisp Machines were the first workstations with GUIs commercially available in 1981. Common Lisp came with its own native binding of X11 - CLX from day one.

> 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.


Re: rewriting

I stated that Common Lisp was developed before the commercial internet & args.


Let's see:

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.


Common Lisp: The Language Guy L. Steele, ISBN 093237641X Publisher: Digital Press, 1984

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.


ANSI CL standard, published in 1994.

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?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: