RCArray is unsafe

Zach the Mystic via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 2 05:37:15 PST 2015

On Monday, 2 March 2015 at 05:57:35 UTC, Walter Bright wrote:
> On 3/1/2015 12:51 PM, Michel Fortin wrote:
>> That's actually not enough. You'll have to block access to 
>> global variables too:
> Hmm. That's not so easy to solve.

But consider this. It's only an impure function which might alias 
a global. And since you already have access to the global in the 
impure function, there might be less incentive in general to pass 
it through a function. Other than that, you're stuck with a 
theoretical "@impure!varName" function attribute, for example, 
which tells the caller which globals are accessed.

More information about the Digitalmars-d mailing list