[Issue 14232] redundant attribute 'const'

2015-06-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #23 from github-bugzi...@puremagic.com ---
Commit pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/53c5b59ca83e471fea6e4464862b39e62df0f335
Merge pull request #4458 from
mihails-strasuns-sociomantic/redundant-attrib-deprec

--


[Issue 14232] redundant attribute 'const'

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|unspecified |D2

--


[Issue 14232] redundant attribute 'const'

2015-04-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #22 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9edd2223950b919a201cf104601f877283cca2bf
Merge pull request #4458 from
mihails-strasuns-sociomantic/redundant-attrib-deprec

--


[Issue 14232] redundant attribute 'const'

2015-03-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #21 from github-bugzi...@puremagic.com ---
Commit pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9edd2223950b919a201cf104601f877283cca2bf
Merge pull request #4458 from
mihails-strasuns-sociomantic/redundant-attrib-deprec

[REG] fix Issue 14232 : redundant attribute 'const'

--


[Issue 14232] redundant attribute 'const'

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--


[Issue 14232] redundant attribute 'const'

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #20 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/53c5b59ca83e471fea6e4464862b39e62df0f335
Merge pull request #4458 from
mihails-strasuns-sociomantic/redundant-attrib-deprec

[REG] fix Issue 14232 : redundant attribute 'const'

--


[Issue 14232] redundant attribute 'const'

2015-03-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #19 from Dicebot  ---
https://github.com/D-Programming-Language/dmd/pull/4458

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #18 from Martin Nowak  ---
(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.

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #17 from Kenji Hara  ---
(In reply to Martin Nowak from comment #4)
> (In reply to Ketmar Dark from comment #3)
> > should any bug be deprecated first — just in case somebody wrote invalid
> > code relying on that bug?
> 
> Usually yes, but within reason, depending on how complicated it is to fix
> the code compared to how complicated the deprecation is.

An application of deprecation process will be legitimate only when the
deprecated behavior was valid and designed feature in old versions.

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.

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.

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #16 from Ketmar Dark  ---
> How about you work with Brian on getting it integrated for 2.068?
i've never seen a call for help from him. but sure, if he needs any help i can
provide, i'm ready to do that... after dfix inclusion will be officially
approved by Walter and Andrei. working for a trashcan is not fun.

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #14 from Dicebot  ---
Thanks, working on it.

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #15 from Martin Nowak  ---
(In reply to Ketmar Dark from comment #11)
> i'm far from saying that nothing should be done. actually, i'm saying the
> exact opposite thing: it's time to bless dfix and bundle it with compiler
> package, so people can upgrade to new compiler versions without much pain.

Yes, just like I said. Once dfix is ready and we include it in our release we
might modify the policy for such changes. But we include dfix just a few days
before a release. How about you work with Brian on getting it integrated for
2.068?

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #13 from Martin Nowak  ---
Thanks @dicebot.
It's this error you're triggering.
https://github.com/9rnsr/dmd/commit/1b932b9282df6ed312b6da0031417ea0d4f8faa5#diff-62dcb5f0ffc3089b7565897d8beb3322R918

At best you pass a `bool onlyWarn = false` to `appendStorageClass`, and then
pass `true` for places were it didn't previously error.

The actual error was introduced here.
https://github.com/D-Programming-Language/dmd/pull/3689

Be careful to preserve existing errors.
https://github.com/9rnsr/dmd/commit/1b932b9282df6ed312b6da0031417ea0d4f8faa5#diff-62dcb5f0ffc3089b7565897d8beb3322R503

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #12 from Dicebot  ---
Can you please resist the temptation to start another pointless discussion with
ketmar? I don't want to disable notifications for this issue.

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #10 from Martin Nowak  ---
(In reply to Ketmar Dark from comment #7)
Once dfix is ready for primetime and is release with dmd we might switch to a
model where we such changes are accompanied with a rewrite in dfix. But for
now, it's really unprofessional to suddenly break code.

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #11 from Ketmar Dark  ---
but why? it's not the compiler task to babysit old and broken code, it's
lint(dfix) task. removing that burden from compiler allows alot more
possibilities, as compiler code stays clean, and dfix can accumulate alot of
checks, allowing easy fixing the code even from the very old compiler release
with step-by-step upgrading.

i'm far from saying that nothing should be done. actually, i'm saying the exact
opposite thing: it's time to bless dfix and bundle it with compiler package, so
people can upgrade to new compiler versions without much pain.

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #9 from Dicebot  ---
It was introduced in 1b932b9282df6ed312b6da0031417ea0d4f8faa5
I am looking in how deprecation message can be added

--


[Issue 14232] redundant attribute 'const'

2015-03-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #8 from Martin Nowak  ---
(In reply to Ketmar Dark from comment #7)
> so do you mean that if some syntax was allowed by accident, it should be
> kept forever

No it should be kept for one release with a deprecation warning attached.

--


[Issue 14232] redundant attribute 'const'

2015-03-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #7 from Ketmar Dark  ---
so do you mean that if some syntax was allowed by accident, it should be kept
forever, shitting compiler code with hacks over hacks trying to accept both
valid code and invalid code?

no, really, there is no single reason to accept invalid code. invalid code must
not compile. not "silently accepted", not "warned", not "deprecated".

or, taking "POV example", the bare minuimum of sanity in language is not
accepting invalid code, regardless of how much somebody wants it to stay with
us.

--


[Issue 14232] redundant attribute 'const'

2015-03-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

Dicebot  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||pub...@dicebot.lv
 Resolution|WONTFIX |---

--- Comment #6 from Dicebot  ---
> Fixing something like this takes so little time that nobody cares.

This is fundamentally flawed attitude I wish was less common in D community. As
someone who is responsible for fixing stuff I don't even slightly care if
required change is trivial or not - what I care most that the code that used to
work (and work correctly!) suddenly stopped compiling with no warning and/or
explanation. There shouldn't be legitimate reason for doing things like that
ever, not matter how trivial and justified change is.

Breaking changes are awesome but only when they are done right. I want to be
sure that if I update the compiler stuff that wasn't warned in previous release
will keep compiling. This is bare minimum for planning sane upgrades.

--


[Issue 14232] redundant attribute 'const'

2015-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #5 from Ketmar Dark  ---
this effectively turns compiler code to unmaintainable spaghetti. and i believe
that this is the perfect application for lint-like tool (yes, devs can finally
bless dfix). with dfix blessed and considered the part of the compiler such
bigfixes can be accompanied by a PR with new rule for dfix. this will solve the
problem and allow keeping frontend code clean.

--


[Issue 14232] redundant attribute 'const'

2015-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #4 from Martin Nowak  ---
(In reply to Ketmar Dark from comment #3)
> should any bug be deprecated first — just in case somebody wrote invalid
> code relying on that bug?

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

--


[Issue 14232] redundant attribute 'const'

2015-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

Ketmar Dark  changed:

   What|Removed |Added

 CC||ket...@ketmar.no-ip.org

--- Comment #3 from Ketmar Dark  ---
should any bug be deprecated first — just in case somebody wrote invalid code
relying on that bug?

--


[Issue 14232] redundant attribute 'const'

2015-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

Martin Nowak  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--


[Issue 14232] redundant attribute 'const'

2015-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

briancsch...@gmail.com changed:

   What|Removed |Added

 CC||briancsch...@gmail.com

--- Comment #2 from briancsch...@gmail.com ---
Here are my thoughts as somebody who is responsible for ensuring that my
employer's D code is ready for new compiler releases: Fixing something like
this takes so little time that nobody cares.

Actually, we do care. We care that the compiler helped us fix bad code.

If you want an example of the kind of problem that industry D users face during
compiler upgrades, look at #14169 instead of this.

--


[Issue 14232] redundant attribute 'const'

2015-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14232

--- Comment #1 from Kenji Hara  ---
The following program already reported same error in 2.066:

struct Bug
{
const const void bug()
{
}
}

test.d(3): Error: redundant attribute 'const'

--