Category:TXR: Difference between revisions

m
Line 48:
TXR Lisp dispenses with the distinction between quoted lists and quasi-quoted lists, in favor of an experiment to combine them. There one quoted syntax denoted by forward quote. This syntax supports unquoting. If you don't unquote anything, you get a regular quote. Splices are not spelled <code>,@</code> because we have had enough of the <code>@</code> character, and because it is ambiguous: does <code>,@x</code> mean "unquote (meta x)" or "splice x?" So the splice operator is denoted by an asterisk. Because there is only one kind of quote, there is some reduction in power in regard to mixing quotes and quasiquotes in one expression due to the ambiguity. The quasi-quote expander contains some hacks to make all the common cases work fine. Notably, the combinations <code>,'form</code> and <code>,*'form</code> (unquote quoted expression and splice quoted expression) are treated specially: the "comma cancels the quote", and so any unquotes inside <code>form</code> do not belong to the inner quote, but to the surrounding quote.
 
==== Good HackerHackers Borrow; Great Ones Steal ====
 
TXR steals ideas from libraries and languages related to Lisp. The <code>op</code> operator is inspired by Goo's <code>op</code>, and the cl-op library for Common Lisp which is also inspired by Goo's <code>op</code>.
543

edits