On May 23, 2013, at 09:13 PM, Steven Schveighoffer <[email protected]> wrote:

I think there's a misunderstanding here. The proposal is to cause an error UNLESS you add a switch to the compiler. In other words, you have to opt-in to get the new behavior.

Doing nothing, just running your existing build command, you get an error. Then you have to either:

a) fix all the locations, moving them to static (or realizing your code had a huge bug originally because you thought that was an actual member)
b) if you plan on using the new feature, add the -enableNewFeature switch (name obviously TBD).

The error message should be something like:

Error: initializing a const instance member needs -enableNewFeature compiler switch, or must be changed to static.
 
That will still break existing code. Although you'll get a proper error message instead of a silent break.

--
/Jacob Carlborg
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to