[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] riaxpander bug(?) with #!optional
From: |
Peter Wright |
Subject: |
Re: [Chicken-users] riaxpander bug(?) with #!optional |
Date: |
Wed, 18 Jun 2008 08:45:26 +0800 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
On 17/06 23:13:13, felix winkelmann wrote:
> On Mon, Jun 16, 2008 at 4:06 PM, Peter Wright <address@hidden> wrote:
> > After recently rereading Alex's informative post on Chicken macro
> > systems a month or so ago, I was trying out riaxpander as a
> > replacement for syntactic-closures, but have just run into some
> > rather odd behaviour.
>
> I'm not sure (and can't try it out right now).
No problem - I understand you're probably having far too much fun with
hygienic-chicken at the moment. :)
> It is possible that riaxpander simply does not support this.
Hm. That would be depressing. Although - no, this seems to work:
; ------- wtf2.scm -------
(use riaxpander)
(define (wtf x #!optional (y "Bob") (z "Dave"))
(printf "Hello ~A! How is ~A?~%" x y))
(wtf "Jim")
; ------- wtf2.scm -------
...ie. doing nothing more than adding an *extra* (ie. not even used)
optional argument is enough to make it compile/run correctly.
Weird.
Okay, I may have to resort to drastic measures - eg. actually looking
at the (riaxpander) code in question. No pain, no gain. :)
It _looks_ like this is the failing line from riaxpander:
http://trac.callcc.org/browser/release/3/riaxpander/riaxpander-chicken-macros.scm?rev=10322#L248
...but I'm not sure what it's supposed to be doing. And the
indentation looks wrong (which tends to be a good hint of badness in
my *own* code at least :)).
Ah well, I'll investigate it a bit further and perhaps compare with
the syntactic-closures implementation.
> cheers,
> felix
Pete.
--
A language that doesn't have everything is actually easier to program
in than some that do. -- Dennis M. Ritchie