Subject: Re: Theory #51 (superior(?) programming languages)
From: Erik Naggum <erik@naggum.no>
Date: 1997/01/21
Newsgroups: comp.arch,comp.lang.lisp,comp.lang.scheme
Message-ID: <3062850267355805@naggum.no>


* Erik Naggum
| _I'd_ like a _low-level_ language to handle integer overflow, or at least
| give me access to this absolutely _vital_ information.  C doesn't.

* D. J. Bernstein
| unsigned long u;
| unsigned long v;
| 
| ...
| 
| v += u;
| if (v < u) overflow();

thank you.  you prove my point most eloquently: C does not give programmers
access to arithmetic condition known as "overflow".

as I said, A+1 is either A+1, 0 or -(A+1) in C.  you can test which of
these values you get, but you cannot detect overflow in the general case.
obviously, that claim cannot be refuted by producing one _more_ special
case.

#\Erik
-- 
1,3,7-trimethylxanthine -- a basic ingredient in quality software.