Sharing in D

Russell Lewis webmaster at villagersonline.com
Thu Aug 7 22:09:30 PDT 2008


Steven Schveighoffer wrote:
> "Russell Lewis" wrote
>> Walter Bright wrote:
>>> Shared cannot be implicitly cast to unshared. Just like const cannot be 
>>> implicitly cast to mutable.
>> But you can implicitly cast unshared to shared, right?
> 
> No.  There is no implicit casting or else you can have data that is shared 
> and unshared at the same time.  It will be up to the coder to ensure only 
> one is happening at a time.

Yeah, I saw your (was it you?) example of how that would become 
problematic.  Did you see my "scope locks" idea as a possible way to 
safely move data between the shared & unshared realms?



More information about the Digitalmars-d mailing list