RFC: Value range propagation for if-else
Meta via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jun 18 13:06:20 PDT 2014
On Wednesday, 18 June 2014 at 20:00:20 UTC, H. S. Teoh via
Digitalmars-d wrote:
> Until you compile with -release, and then suddenly invalid
> input crashes
> your program. :-P (Then you'll go and fire the guy who wrote
> it.)
>
>
> T
My point exactly. If contracts allow things like what Bearophile
wants to work, then people might use them to do input/output
validation instead of validating basic assumptions, like they're
supposed to do. Then we have problems like you described. Maybe
it's a good idea to keep contracts as-is and not allow them to
change a function's semantics like this, since they are removed
in release.
More information about the Digitalmars-d
mailing list