[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Kawa-commonlisp-dev] [GSoC] Destructuring bind
From: |
Charles Turner |
Subject: |
Re: [Kawa-commonlisp-dev] [GSoC] Destructuring bind |
Date: |
Tue, 31 Jul 2012 20:51:05 +0100 |
On 31 July 2012 08:19, Helmut Eller <address@hidden> wrote:
> Remember that macros are expanded at compile time and the compiled code
> doesn't need the macro definition. SBCL is a meta-circular
> implementation, i.e. the SBCL compiler is compiled by another CL
> compiler. That makes some things easier. The other compiler already has
> a working DESTRUCTURING-BIND so they are free to use it in the SBCL
> source code.
Ah, makes sense now. Thanks.
> Doing that manually isn't that hard:
Good idea! I'll eventually get the hang of this... :)
> Also CMUCL's version of parse-defmacro-lambda-list uses no
> DESTRUCTURING-BIND at all:
> http://common-lisp.net/gitweb?p=projects/cmucl/cmucl.git;a=blob_plain;f=src/code/defmacro.lisp;hb=HEAD
Hm, that does seem a lot simpler (lot of common code of course). But
I've committed to the SBCL implementation now, and I've had no further
missing features, other than a couple of TAGBODY things again, but I'm
avoiding for now using exit continuations.
I have now finished importing the bulk of the code required for
PARSE-DEFMACRO. It's not yet working, loads of bugs probably to be
worked out, but it's at least being eaten by the compiler. I've
uploaded it to my repository now, but I expect to be spending quite of
a lot of time getting it to work correctly:
http://chturner.com/kawa/trunk/gnu/commonlisp/lisp/defmacro.lisp
> Rewriting everything in Java is an option, but IHMO it's
> more elegant to write as much in Lisp as possible.
I agree.
Thanks,
Charles.