Transitive const sucks

Walter Bright newshound1 at digitalmars.com
Wed Sep 12 11:46:31 PDT 2007


Reiner Pope wrote:
> As far as I can see, this re-enables the benefits of transitive const 
> for functional and multi-threaded programming, as the compiler is free 
> to ignore any changes to the variable, just as it is for transitive const.

It doesn't re-enable any benefits, as all the usual synchronization, 
race conditions, etc., are there in full force. You're back to relying 
on programmer discipline to make it work right, and experience shows 
that that doesn't work for multithreading.



More information about the Digitalmars-d mailing list