A few thoughts on std.allocator

Brad Anderson via Digitalmars-d digitalmars-d at puremagic.com
Tue May 12 09:53:32 PDT 2015


On Tuesday, 12 May 2015 at 15:51:38 UTC, Steven Schveighoffer 
wrote:
> The whole concept of immutable being implicitly shareable is 
> kind of broken. There are many reasons to have immutable 
> unshared data, and it poisons const to the point where you 
> really should consider any const variable to be also shared.
>
> -Steve

What are the extra implications of having to think of all const 
variables as shared? I guess it would mean the currently 
unimplemented memory barriers should happen for const variables 
as well. That does seem like a problem.


More information about the Digitalmars-d mailing list