preparing for const, final, and invariant

torhu fake at address.dude
Fri May 18 13:36:26 PDT 2007


Manfred Nowak wrote:
> torhu wrote
> 
>> It does make a copy, but if g is 'scope', you're only allowed to
>> have local copies of a.
>> 
>> This would be fine:
>> 
>> int[] b = a;
> 
> I understand this exactly as you say it: only local copies are allowed!
> 
> But `writef( &b);' as well as `writef( &a);' may create global copies, 
> i.e. at least not local copies.
> 
> If this holds, then the scope-rule forbids printing out.
> 
> But Walter responds with "Making copies is allowed." Which seems to 
> mean, that global copies are allowed by printing out---or his remark 
> has nothing to do with the problem stated.
> 
> How to resolve this contradiction?

It's not a contradiction.  Only references that are actually inside your 
application are relevant for this rule.



More information about the Digitalmars-d-announce mailing list