Proposal to make "shared" (more) useful

Arafel er.krali at gmail.com
Thu Sep 13 14:43:51 UTC 2018


On 09/13/2018 04:27 PM, Adam D. Ruppe wrote:
> On Thursday, 13 September 2018 at 13:53:49 UTC, Arafel wrote:
>> * Make all _private non-reference fields_ of shared, synchronized 
>> classes __gshared.
> 
> so __gshared implies static. Are you sure that's what you want?

Indeed it isn't! Why must __gshared be static?? (BTW, thanks a lot, you 
have just saved me a lot of debugging!!).

Then, how on earth are we supposed to have a struct like SysTime as a 
field in a shared class? Other than the "fun" of having a shared 
*pointer* to such a struct that then you can cast as non-shared as needed...

But let's say that this solution seems quite...... sub-optimal... at so 
many levels...


More information about the Digitalmars-d mailing list