auto, var, raii,scope, banana

Sean Kelly sean at f4.ca
Thu Jul 27 11:41:52 PDT 2006


John Reimer wrote:
> On Wed, 26 Jul 2006 02:52:06 -0700, Hasan Aljudy 
> <hasan.aljudy at gmail.com> wrote:
> 
>> vote++;
>> //me likes
>>
> 
> I am sympathetic to the "scope" suggestion also.  People have to 
> remember that Walter doesn't like adding any new keywords.  Reuse of 
> "scope" may be the best solution here.  Are there any drawbacks? Does it 
> fit the intended meaning and purpose appropriately?  It seems to.

Given the suggested placement, I assume it would be illegal to reassign 
a 'scope' reference to another object?  ie.

     class C {}

     scope C var = new C();
     var = new C();

Assuming a reassignment is allowed, I assume the original object would 
not be destroyed on scope exit?  Basically, I'm wondering whether the 
'scope' qualifier is attached to the reference or to the referent.


Sean



More information about the Digitalmars-d mailing list