[dmd-beta] dmd 2.063 beta 5

Steven Schveighoffer schveiguy at yahoo.com
Thu May 23 08:52:41 PDT 2013


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.

-Steve


More information about the dmd-beta mailing list