[Top][All Lists]

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

Re: [Chicken-users] Bug report: low-level macros vs. variables in csi

From: John Cowan
Subject: Re: [Chicken-users] Bug report: low-level macros vs. variables in csi
Date: Thu, 13 Mar 2008 15:13:00 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Graham Fawcett scripsit:
> On Thu, Mar 13, 2008 at 12:05 PM, John Cowan <address@hidden> wrote:
> >  Proposed course of action: have the interpreter check whether an
> >  identifier is the name of a macro and signal an error rather than using
> >  any existing definition.
> You mean, upon every expression evaluation, or just when (set!
> macro-name ...) is evaluated?

It has to be the former to achieve the desired effect.  Each name in
Scheme should have just one definition, or none; if a name is defined as a
syntax identifier, it should not also be allowed to be a value identifier.

> For symmetry, should it also raise an error if you try to define a
> macro with the same name as an existing identifier? "First system to
> claim the name wins"?

No, the rule in all other parts is "last wins", and that's what I intend.
A define-macro should override a preceding define, and a define should
override a preceding define-macro.
> Graham

John Cowan  address@hidden
The penguin geeks is happy / As under the waves they lark
The closed-source geeks ain't happy / They sad cause they in the dark
But geeks in the dark is lucky / They in for a worser treat
One day when the Borg go belly-up / Guess who wind up on the street.

reply via email to

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