Don:

> The "overflow12.pdf" paper on that site shows statistics that overflow 
> is very often intentional.

In C/C++ code, but we are developing D, a new language that hopes to fix some 
of the mistakes of languages invented lot of time ago.


> It's strong evidence that you *cannot* make signed overflow an error.

In C/C++ code, maybe, yet they suggest to invent better tools to find overflow 
in C/C++ programs too.

In better/modern languages signed overflow is correct only in the precise 
points where it is required. The overflow (for signed) or wraparound (for 
unsigned) has not to be the default behaviour, because it's crappy and often 
leads to bugs.


>  Even if you could do it with zero complexity 
> and zero performance impact, it would be wrong.

In C/C++, maybe. But not in D/Ada/Delphi/Haskell/etc.

Bye,
bearophile

Reply via email to