chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] define-syntax available *by default*?


From: felix winkelmann
Subject: Re: [Chicken-users] define-syntax available *by default*?
Date: Wed, 3 Nov 2004 08:35:19 +0100

On Tue, 02 Nov 2004 11:41:47 +0000, Tony Garnock-Jones
<address@hidden> wrote:
> felix winkelmann wrote:
> > Alas, I think syntax-case should not be the default. The problem is that
> > defmacro macros can be compiled into the code, but psyntax macros
> > have to be parsed at runtime, which results in (depending on machine
> 
> I don't understand this. Doesn't psyntax expand into a sequence of
> expressions, some of which populate a table with a constant data
> structure, and others of which are actual expanded code? Surely there's
> no runtime expansion going on?
> 

Yes, but the initial macros required have to be expanded at runtime.
(Like syntax-rules, which is just a wrapper around syntax-case, or
and, or, let, cond, etc.). This can be easily handled in implementations
that are able to save an "image", but not in Chicken.
Low-level macros can be expression in low-level terms as
(##sys#register-macro <symbol> <expander-procedure>)
and this can be easily compiled and performed at runtime.
I'm sure one can do something like this with psyntax, but I simply
don't grokk the psyntax code enough.


cheers,
felix




reply via email to

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