[dmd-concurrency] tail-shared by default?
    Walter Bright 
    walter at digitalmars.com
       
    Fri Jan  8 13:53:07 PST 2010
    
    
  
Steve Schveighoffer wrote:
> ----- Original Message ----
>
>   
>> From: Walter Bright <walter at digitalmars.com>
>>
>> Steve Schveighoffer wrote:
>>     
>>> The only caveat is, we would *need* to change the semantics of shared so that 
>>>       
>> you can have a non-shared reference to a shared class instance easily.
>>
>> That's the so-called "tail-shared" problem. We tried (hard) to make "tail-const" 
>> work, where the reference is mutable but the contents were const. It sounds 
>> simple, but just does not work in a language with implicit reference semantics.
>>     
>
> Yes, but this isn't const, it is shared.
To the type construction system, they are handled the same. Tail-shared 
will have the same insurmountable problems that tail-const had.
>
> What do you think about this?
>
>
>   
I tried desperately to make tail-const work. It wasn't going to, and 
neither is tail-shared for the same reasons.
    
    
More information about the dmd-concurrency
mailing list