checkedint call removal
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Sat Aug 2 12:32:01 PDT 2014
On 08/02/2014 09:01 PM, Walter Bright wrote:
>
> I think at this point it is quite clear that D's assert is about the
> programmer saying this expression evaluates to true or it's a
> programming bug.
That was already obvious to most before the discussion started.
In any case, the way you'd need to put it in order to make a meaningful
statement is e.g. that such failures abort the program in non-release
and lead to undefined behaviour in release. Just state the plain semantics.
This behaviour is 'right' by definition, but is not backed up by any
deeper reason or close-to-universally convincing design rationale.
Please let it go.
>
>
> If other languages use assert to mean "the compiler must prove this to be true"
> then that's fine for those languages,
Thanks for finally admitting a point like this.
> but it isn't what D's assert is, or can ever be.
It is enough if what D's assert is and has been so far does not change.
Not using asserts as sources of undefined behaviour when using the
switch that has traditionally been used to disable them would already be
sufficient. Why do you think there should be no compromise giving all
the parties what they want?
More information about the Digitalmars-d
mailing list