Module level variable shadowing

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 27 13:40:24 PDT 2014


On 6/27/2014 1:38 PM, Tofu Ninja wrote:
> On Friday, 27 June 2014 at 08:24:16 UTC, dennis luehring wrote:
>> what i don't understand - why on earth should someone want to shadow a(or
>> better any) variable at all?
>
> It can be useful if you are using mixins where you don't know what is going to
> be in the destination scope.

Is true. People who do metaprogramming with C macros have all kinds of problems 
with the lack of scoping of temp variable names within the macros.


More information about the Digitalmars-d mailing list