From ... From: Erik Naggum Subject: Re: Theory #51 (superior(?) programming languages) Date: 1997/01/23 Message-ID: <3062969201915975@naggum.no>#1/1 X-Deja-AN: 211580081 references: <3059948144828413@naggum.no> <3062757753734625@naggum.no> <1997Jan2108.28.23.6335@koobera.math.uic.edu> <3062850267355805@naggum.no> <1997Jan2123.11.15.1935@koobera.math.uic.edu> mail-copies-to: never organization: Naggum Software; +47 2295 0313; http://www.naggum.no newsgroups: comp.arch,comp.lang.lisp,comp.lang.scheme * 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. #\Erik -- 1,3,7-trimethylxanthine -- a basic ingredient in quality software.