Opinions on macro hygiene?

0 views
Skip to first unread message

Rick Copeland

unread,
Apr 19, 2009, 9:29:39 PM4/19/09
to metapython
I have opened a ticket (issue #1! yay!) to discuss possible approaches
to macro hygiene. Please give me any feedback either here or on the
ticket.

Thanks,
Rick

Here's the issue:

Reported by rick...@usa.net, Today (3 minutes ago)

Variables used inside macros can shadow variables used in the context
in
which the macro is expanded. There should be (at least) a mechanism
for
generating unique names for use within a macro.

Delete comment
Comment 1 by rick...@usa.net, Today (1 minute ago)

One approach here should be to allow defcode blocks to have a sanitize
() method.
This will either take a list of variable names to be sanitized, or
will sanitize all
variable names in the block if none are listed.

Another possible approach is to change the defcode syntax to specify
variables *to
be* captured, sanitizing by default.

I am welcome to any suggestions.

Reply all
Reply to author
Forward
0 new messages