|
New, from-scratch implementation of backquote.: msg#00066lisp.clisp.general
Hi, I found the following thread from 1999 quite intriguing: Christopher R. Barry in cll on: quasiquote reference implementation http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=87vh8hk0dj.fsf%402xtreme.net&rnum=8 (defmacro defclass* (name supers slots &rest options) `(macrolet ((do-it () `(defclass ,,name ,,supers ,,slots ,,@options))) (do-it))) Now you can do something like: USER(15): (loop for i from 1 to 3 collect (defclass* (intern (format nil "FOO-~D" i)) () ())) (#<STANDARD-CLASS FOO-1> #<STANDARD-CLASS FOO-2> #<STANDARD-CLASS FOO-3>) In CLISP-2.30, this gives *** - EVAL: variable I has no value For reasons I don't yet understand (I'm not even sure one can expect the do-it trick to work in all kinds of macroexpansion). A simple case works: > (defclass* (intern "FOO-1") () ()) #<STANDARD-CLASS FOO-1> BTW, the above thread is the one (from 1999) were I suggested a programmable interface to backquote: what you implemented now for CLISP! Regards, Jorg Hohle. ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | (±¤°í) ++ Bulk Email Does Work ++: 00066, san |
|---|---|
| Next by Date: | Re: What are CLISP's "selling" points?: 00066, Johannes Grødem |
| Previous by Thread: | (±¤°í) ++ Bulk Email Does Work ++i: 00066, san |
| Next by Thread: | Re: New, from-scratch implementation of backquote.: 00066, Kaz Kylheku |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |