|
![](/i/fill.gif) |
> This is a known problem, although I do not know that the POV Team perceives it
> as a problem. When I brought it up 5 years ago, I was quoted documentation of
> macro names being global in scope, which was just a red herring.
The documentation also states that "[#local] temporarily override any
identifiers with the same name." IMO a bit more clarification should be
added there, something along the lines of "...unless the identifier name
is already in use as a macro name, or the #local statement is in a macro
definition and the identifier name matches one of the macro parameter
names.".
> This behavior
> breaks the very concept of local variables and makes "black box" modularization
> impossible.
Exactly, in my relatively simple macro which I doubt very many people
have tried out yet, two people got different namespace clash related
errors with #local's I'd used inside the macro. In future I'll make sure
to make all variable names and parameter names unique (by prefixing with
my name and/or the macro name etc), at which point I might just as well
use #declare!
I can't believe more people haven't come across this "feature" in the
last 5 years.
Post a reply to this message
|
![](/i/fill.gif) |