Fully transitive const is not necessary
Walter Bright
newshound1 at digitalmars.com
Wed Apr 2 02:58:15 PDT 2008
Don Clugston wrote:
> As far as I can tell, it's like any optimisation problem -- it's only
> 5-10% of the code that matters: it's only necessary to use multiple
> cores efficiently in a small fraction of the code (obviously the entire
> code needs to be correct). So I'm a little uneasy about arguments for
> const based on efficiency concerns -- there are many opportunities to
> worry about stuff which is ultimately irrelevant. I hope that's not
> happening here.
Although better code generation is a positive consequence of const, and
is worth mentioning, it isn't the motivation for it.
What const and transitive const achieves is more reliable and more
demonstrably correct code, which will indirectly improve productivity.
More information about the Digitalmars-d
mailing list