checkedint call removal

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 31 12:11:58 PDT 2014


On 7/31/2014 7:51 AM, Tofu Ninja wrote:
>> For example, you can have a sort function, and then at the end assert that the
>> output of the function is sorted.
>
> But that is verifying that the input is sort-able....

Integers are sortable, period. That is not "input".


> All I am saying is that the idea that assert should not be used to verify input
> makes no sense at all. Every program takes in input and once a little bit is in,
> anything derived from that input is also input.

You're denying the existence of mathematical identities applied to symbolic math.


> Also this thread has made me firmly never want to trust assert again... I have
> actually been going though my projects and removing them now because I don't
> trust them any more...

I suggest revisiting the notion of program logic correctness vs input verification.


More information about the Digitalmars-d mailing list