[q-lang-users] Q as a 2Lisp
Brought to you by:
agraef
From: John C. <co...@cc...> - 2006-05-17 19:04:57
|
It occurred to me today that a subset of Q constitutes an implementation of 2Lisp, a dialect of Lisp invented by Brian Cantwell Smith for his thesis. (2Lisp should not be confused with Lisp-2, a category of Lisps that have separate variable and function bindings, nor with Lisp 2.0, a long-dead Lisp dialect with Algolesque syntax.) The principal difference between 2Lisp and most Lisps is that 2Lisp normalizes rather than evaluating, just as Q does. Thus, the normalized value of 2 is 2, but the normalized value of '2 is '2 (unlike standard Lisp, in which the value of both '2 and 2 is 2). 2Lisp similarly discriminates between applications (written with parens) and lists (written with brackets), as Q does. Vectors/tuples don't exist in 2Lisp, but that's a minor point. Of course, Q is a lot more flexible than 2Lisp is. But again, it's interesting that there is a 2Lisp core to Q. -- John Cowan co...@cc... http://ccil.org/~cowan The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. --Edsger Dijkstra |