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

* D. J. Bernstein
| I proved the opposite: the concept of ``overflow'' for unsigned additions
| is trivially expressible in C.

no, what you showed was one _example_ of an unrelated comparison after an
addition which could determine that the addition had produced the wrong
result.  that should have been done by the compiler, and there should have
been a way for a program to be alerted to such overflows if it needed to
know, _without_ having to add code after every single operation using
explicit intermediate results, which is _very_ far from what I consider the
"trivially expressible".

what with exceptions C++, you'd expect that the desire for such primitive
exceptions would be very simple to request, but no, you can't, because C
and C++ has no intention to support such concepts as accurate arithmetic.
C++ has even retained C's bogus division operator!

a _proof_ would have required an exhaustive list of tests for all types.
a _proof_ that "overflow" is "trivially expressible in C" would have
included means to add overflow detection to basic integer operations.

you flunk, D. J. Bernstein.

| There are lots of good examples of common machine operations that are
| difficult to express in C; why did you choose such a stupid example?

I'm sorry to say so, but it looks stupid to you only because you aren't
bright enough to understand the issues I raised and you instead think this
is about machine operations, which, I agree, would have been stupid.

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