Does the spec take priority over the compiler?

Adam D. Ruppe destructionator at gmail.com
Sun Dec 16 22:23:33 UTC 2018


On Sunday, 16 December 2018 at 21:32:50 UTC, Steven Schveighoffer 
wrote:
> the spec says, but the reality is that it would break too much 
> code in a horrible way to make it a reality.

If the spec says it and the code is not compliant, the code is 
*already broken*, by definition, and now the compiler is fixing 
its own bug that allowed invalid.

And I betcha a lot of people would be happy to see their hidden 
bugs now show up as a compile time error.


But that said, it is an embarrassing travesty that we don't have 
impure, @gc, virtual, throws, etc., to invert those things. Those 
NEED to be added ASAP if we want to have any sanity moving 
forward. With them, there is a sane transition/deprecation path 
to this bug fix among many other things, and we can write code 
that works in both cases by specifying either way.

Without them, the attributes suck regardless.


More information about the Digitalmars-d mailing list