[Issue 14232] redundant attribute 'const'

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 6 13:25:06 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #18 from Martin Nowak <code at dawg.eu> ---
(In reply to Kenji Hara from comment #17)
> Accepting redundant attributes had not been documented in language spec, it
> has been just accidentally accepted. Therefore, consistently disabling them
> all is a bugfix. Even though it will break some user code suddenly,
> deprecation process should not be applied.

No, we shouldn't just break code without good reason. Certain changes that
detect latent bugs might be OK (escape analysis), but fixing this error hardly
adds any benefit for code owners. It's very trivial to fix though.

There are plenty of small issues with dmd and if the compiler doesn't adhere to
the specs we can't any programmer to do this instead.

> And from a realistic reason, It's difficult. In old dmd version, some of
> redundancies were properly disallowed, and remaining were (unintentionally)
> accepted. To deprecate invalid accepted case, we should emulate old
> unintentional compiler behavior. It's too costly, and I don't want to do it.

I understand that, that's why I initially close the report and it's what I
meant with comment 4.

> Usually yes, but within reason, depending on how complicated it is to fix the code compared to how complicated the deprecation is.

But I'm fine with Dicebot adding a deprecation, if he want's to do it.

--


More information about the Digitalmars-d-bugs mailing list