[dmd-beta] dmd 2.063 beta 5

Andrei Alexandrescu andrei at erdani.com
Thu May 23 11:48:11 PDT 2013


On 5/23/13 11:52 AM, Steven Schveighoffer wrote:
> Regarding the current controversy on the NG (and in this mailing list) on const/immutable members with initializers, I would like to propose the following compromise (as posted in the NG):
>
> 1. Make a default-initialized const or immutable member an error.  It is not good to allow code with changed semantics (especially of this magnitude) to silently compile without intervention.
> 2. Disable the error with a switch (to allow for the new behavior).  I believe the current solution is to use a switch to *find* the possibly offending usages.  I think an opt-in approach is better.
> 3. In a future release, remove the error.
>
> I reposted here, in case some are not watching that NG thread.

I think this is a sensible course of action.

Andrei


More information about the dmd-beta mailing list