[Issue 9408] invariant should be non-const by default and settable to const

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 27 16:03:47 PDT 2016


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

Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #5 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
I'm closing this as invalid unless someone comes up with a DIP with all the
pro's and con's. When looking at it from a safety point of view I'd rather not
have someone accidentally modify a variable in an invariant of all places.

Imagine a debug build where a variable was assigned to and made an app work
fine, and then a -release build was deployed without the assignment and causing
hard to track bugs.

--


More information about the Digitalmars-d-bugs mailing list