My Reference Safety System (DIP???)

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 2 16:02:47 PST 2015


On Monday, 2 March 2015 at 23:43:22 UTC, Zach the Mystic wrote:
> Except for this:
>
> static Rctype t; //
>
> fun(t);
>
> Now you have that implicit parameter which screws things up. 
> It's like calling:
>
> fun(@globals, t);
>
> ...where @globals is a namespace which can alias t. So you have 
> two parameters which can alias each other. I think the only 
> saving grace is that you probably don't really need to pass a 
> global that often, since you already have it if you want it. 
> Only if you want the global to "play the role" of a parameter.
>
> What do you think? How many times do you normally pass a global?

I fail too see how t being global vs t being a local that is 
doubly passed change anything.


More information about the Digitalmars-d mailing list