const as default for variables

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 16 02:55:51 PDT 2015


On Sunday, 15 March 2015 at 22:48:18 UTC, Sönke Ludwig wrote:
> My idea was to make the change explicit first, but module wide 
> (e.g. using a pragma or similar), so that there is no immediate 
> breakage at all. Only the last stage of the deprecation plan 
> would finally switch over the defaults for unannotated modules.

This can be an interesting approach to breaking change that don't 
introduce new concepts but it can become tricky with mixins and 
mixin templates because semantic context is different from 
declaration context.


More information about the Digitalmars-d mailing list