const as default for variables

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Sun Mar 15 13:09:54 PDT 2015


On Sunday, 15 March 2015 at 07:44:50 UTC, Walter Bright wrote:
> "const ref" can tell the optimizer that that path for a ref 
> counted object cannot alter its ref count.

That is not clear why. const ref is supposed to protect against 
escaping when ref does not ?


More information about the Digitalmars-d mailing list