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

Re: [Scheme-reports] Are generated toplevel definitions secret?



On Wed 27 Apr 2011 23:01, John Cowan <cowan@x> writes:

> Aaron W. Hsu scripsit:
>
>> > In otehr words, definitions introduced in macros can possibly shadow
>> > toplevel bindings, which is a major obstacle to safe hygienic macro
>> > programming.
>>
>> More than a major obstacle, I would argue that this violates hygiene
>> and should not be allowed in Scheme's hygienic macros.
>
> On that principle, how can you write a macro like define-record-type
> that defines (and potentially redefines, at least in the REPL) various
> identifiers?

Such identifiers are present in the macro input, so their scope is the
output, which is to say all bindings in scope at the top level, if the
form appears at the top level.

This question is about identifiers that are not present in the macro
input, and which are free relative to the definition of the macro (not a
pattern variable, not a lexical variable, not a module-level variable).

Andy
-- 
http://wingolog.org/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports