Fully transitive const is not necessary

Tim Burrell tim at timburrell.net
Tue Apr 1 13:47:22 PDT 2008


Craig Black wrote:
> The D community has been working on this problem for about a year now.  I'm 
> don't know if such a "simple effective" solution exists as you imply.  And 
> even if it does, if it takes us another year to figure it out, then that's a 
> year that we could be doing more productive things.

Working on const and working on a scheme for doing parallel programming 
are basically completely unrelated.  Yeah you may need one to do the 
other, but a means for parallel programming isn't born out of proper 
const support.

> Yes, I think the solution to scalable concurrency will probably be a systems 
> programming language that supports multiple paradigms.  D is a good 
> candidate here, being very multi-paradigm.  I still don't think writing 
> scalable multithreaded apps will ever be easy.

Definitely not.  But there are ways to make it easier.  Currently D 
employs none of these.  Const will not improve the situation.

> My suggestion would be to implement a C++-like "logical const" system using 
> the const keyword, and use the invariant keyword for Walter/Andrei's 
> transitive const.  Maybe that would give us the best of both worlds.

I think I agree with you.  I'd just really like to see this debacle 
sorted out so some real effort can be made toward D3 and the possibility 
of parallel programming support.



More information about the Digitalmars-d mailing list