kawa-commonlisp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Kawa-commonlisp-dev] Appropiate expression class


From: Charles Turner
Subject: Re: [Kawa-commonlisp-dev] Appropiate expression class
Date: Sun, 3 Mar 2013 20:21:21 +0000

On 3 March 2013 19:26, Per Bothner <address@hidden> wrote:
> The general class is Expression.  Commonly it's a QuoteExp, but not always,
> but the default value is an arbitrary expression.
>
> (I think you've been away from Kawa too long, since I believe
> you know this if you think about it ...)

Indeed. I made a grave mistake to let this checkin procedure encroach
on university. I was swamped and now a lot of what I wrote isn't as
clear as it once was. Lesson learnt :/.

> Kawa handles this for Scheme.  The only extra complication for
> Common Lisp is the supplied_p variable.
>
> One way to handle supplied_p without changing gnu.expr is with a
> dummy variable:

It's been such a long time, but I do have all the code that does that
rewrite, it still has some bugs w.r.t aliased keyword arguments, but
otherwise, it works alright.

>> The QuoteExp here isn't right, because with I get results like this:
>>
>> #|kawa:2|# ((lambda (&optional (x 'a x-p) (y 'b y-p) (z 'c z-p)) (list
>> x y z x-p y-p z-p)))
>> ((quote a) (quote b) (quote c) () () ())
>>
>> Here, because the default is of the form (quote x), I'm creating
>> (quote (quote x)). I'm not sure which Expression class best represents
>> this "any valid lisp form".
>
> The Translator#rewrite methods take care of this.

Ah, of course. I have it working now.

Apologies!

Charles.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]