Fully transitive const is not necessary

Steven Schveighoffer schveiguy at yahoo.com
Thu Apr 3 14:15:09 PDT 2008


"Sean Kelly" wrote
> == Quote from Janice Caron article
>> ...which raises an interesting point. Can "synchronized" be used on a
>> const object? What about an invariant object?
>
> They'll work just fine with const objects in D.  Object monitors in D 
> currently
> live outside the const checking scheme.

Oh so you mean Walter couldn't implement mutexes without logical const huh? 
I think this part of the system should be ripped out and you should have to 
pass mutexes along with objects everywhere you want to ensure thread safety 
and const is transitive.  That's easier and less obfuscated, right?

-Steve 





More information about the Digitalmars-d mailing list