How would you do this in D?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed May 11 11:07:34 PDT 2011


On 05/11/2011 12:07 PM, Alexander wrote:
> On 11.05.2011 02:52, Andrei Alexandrescu wrote:
>
>> Note that the macro version has other, arguably larger, drawbacks - e.g. it can't be used as an expression, evaluates the limit multiple times. pollutes the global namespace etc.
>
>    BTW, I don't get it - why *scoped* variable is going to *global* namespace when declared "static"?
>
>    This, IMHO, defeats the value and purpose of scoping...
>
> /Alexander

The macro name itself is polluting the global namespace.

Andrei


More information about the Digitalmars-d mailing list