Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
April 21, 2014 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=12545 -- |
April 21, 2014 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich@gmail.com Blocks| |12545 -- |
April 21, 2014 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=12233 Blocks| |12233 -- |
April 21, 2014 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg@gmx.com --- Comment #3 from Andrej Mitrovic <andrej.mitrovich@gmail.com> --- *** Issue 8817 has been marked as a duplicate of this issue. *** -- |
July 29, 2014 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 davidsp@fb.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |davidsp@fb.com --- Comment #4 from davidsp@fb.com --- *** Issue 13202 has been marked as a duplicate of this issue. *** -- |
July 29, 2014 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 --- Comment #5 from davidsp@fb.com --- I would like to see this disable or if we don't want to break backwards compatibility for this, we should have the compiler issue a warning. As it stands at the moment, the behavior causes more harm then good. -- |
October 07, 2015 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 timon.gehr@gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timon.gehr@gmx.ch --- Comment #6 from timon.gehr@gmx.ch --- (In reply to Walter Bright from comment #1) > They're actually supposed to be overridable at the moment. I had thought > there might be a use for this, but so far none have materialized. > ... There is one obvious use case: struct S{ @disable enum init=0; } It would be better to have a specific feature here though. E.g. struct S{ @disable init; } -- |
October 07, 2015 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 --- Comment #7 from Jonathan M Davis <issues.dlang@jmdavisProg.com> --- (In reply to timon.gehr from comment #6) > (In reply to Walter Bright from comment #1) > > They're actually supposed to be overridable at the moment. I had thought > > there might be a use for this, but so far none have materialized. > > ... > > There is one obvious use case: > > struct S{ @disable enum init=0; } > > It would be better to have a specific feature here though. E.g. > > struct S{ @disable init; } I would have thought that struct S{ @disable this(); } would do that in addition to making S s; illegal. I was surprised to find out that it didn't. But if there _is_ a good reason for S s = S.init; to still work with @disable this(); was used (though I certainly can't think of one), then @disable init; should probably imply @disable this();. -- |
October 08, 2015 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 --- Comment #8 from Sobirari Muhomori <dfj1esp02@sneakemail.com> --- (In reply to timon.gehr from comment #6) > It would be better to have a specific feature here though. E.g. > > struct S{ @disable init; } struct S{ @disable void init(); } ? -- |
October 08, 2015 [Issue 7066] You can redefine .init and .stringof without error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=7066 Sobirari Muhomori <dfj1esp02@sneakemail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=14237 -- |
Copyright © 1999-2021 by the D Language Foundation