common types + type modifiers

Simen kjaeraas simen.kjaras at
Sun Jan 30 08:07:25 PST 2011

Michel Fortin <michel.fortin at> wrote:

>> unless it's acceptable to just make the mutability const. which would  
>> give:
>>          cs            m           cs
>>         cs            c           cs
>>         ms            m           cs
>>         ms            c           cs
> No, that doesn't work. There is no common type between shared and  
> non-shared.

It's also worth add why this is so: shared guarantees that reads and
writes do not overlap. This means all references to an instance must
type it as either shared or non-shared.


More information about the Digitalmars-d-learn mailing list