https://issues.dlang.org/show_bug.cgi?id=5058
Andrei Alexandrescu and...@erdani.com changed:
What|Removed |Added
Version|unspecified |D2
--
http://d.puremagic.com/issues/show_bug.cgi?id=5058
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=5058
Jonathan M Davis jmdavisp...@gmx.com changed:
What|Removed |Added
OS/Version|Linux |All
--- Comment
http://d.puremagic.com/issues/show_bug.cgi?id=5058
--- Comment #8 from Steven Schveighoffer schvei...@yahoo.com 2010-11-01
12:47:25 PDT ---
I look at invariants differently than you do I guess. To me, an invariant is a
self-checking mechanism that says Every public function is going to leave
http://d.puremagic.com/issues/show_bug.cgi?id=5058
--- Comment #9 from Jonathan M Davis jmdavisp...@gmx.com 2010-11-01 13:10:01
PDT ---
Generally, I would agree with you. However, it's quite easy to have a struct
which has things which _should_ be checked in the invariant but which aren't
true
http://d.puremagic.com/issues/show_bug.cgi?id=5058
Peter Alexander peter.alexander...@gmail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5058
--- Comment #4 from Jonathan M Davis jmdavisp...@gmx.com 2010-10-27 15:50:46
PDT ---
All it takes is assigning to a public member variable or a reference to private
member data, and you can invalidate an invariant. Granted, having an invariant
http://d.puremagic.com/issues/show_bug.cgi?id=5058
Steven Schveighoffer schvei...@yahoo.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5058
--- Comment #6 from Jonathan M Davis jmdavisp...@gmx.com 2010-10-27 22:13:01
PDT ---
The problem with that is what if you don't _want_ T.init to pass the invariant?
It seems to me that if T.init doesn't pass the invariant, then really, T.init