Prev: Reader ?
Next: translating cmucl command line to sbcl
From: Pascal J. Bourguignon on 25 Oct 2009 13:29 russell_mcmanus(a)yahoo.com writes: > Vassil Nikolov <vnikolov(a)pobox.com> writes: > >> [*] There are a number of (not just theoretical) reasons why a >> nominally correct implementation may work satisfactorily on toy >> examples, but not be up to scratch on large ones, and such cases >> are best caught early, of course. > > This article comes to mind: > > http://portal.acm.org/citation.cfm?id=1516632&dl=GUIDE&coll=GUIDE&CFID=58206374&CFTOKEN=27403333 Could have been titled "C considered harmful". -- __Pascal Bourguignon__
From: John Thingstad on 25 Oct 2009 21:08 Den Sun, 25 Oct 2009 18:29:33 +0100, skrev Pascal J. Bourguignon: > russell_mcmanus(a)yahoo.com writes: > >> Vassil Nikolov <vnikolov(a)pobox.com> writes: >> >>> [*] There are a number of (not just theoretical) reasons why a >>> nominally correct implementation may work satisfactorily on toy >>> examples, but not be up to scratch on large ones, and such cases >>> are best caught early, of course. >> >> This article comes to mind: >> >> http://portal.acm.org/citation.cfm? id=1516632&dl=GUIDE&coll=GUIDE&CFID=58206374&CFTOKEN=27403333 > > Could have been titled "C considered harmful". Not really. But integers are a range from a to b and b-1+1=a. So all numbers must be thought of as a number x mod b. In assembly it is not unusual to do this deliberatly.
From: Pascal J. Bourguignon on 25 Oct 2009 22:10
John Thingstad <jpthing(a)online.no> writes: > Den Sun, 25 Oct 2009 18:29:33 +0100, skrev Pascal J. Bourguignon: > >> russell_mcmanus(a)yahoo.com writes: >> >>> Vassil Nikolov <vnikolov(a)pobox.com> writes: >>> >>>> [*] There are a number of (not just theoretical) reasons why a >>>> nominally correct implementation may work satisfactorily on toy >>>> examples, but not be up to scratch on large ones, and such cases >>>> are best caught early, of course. >>> >>> This article comes to mind: >>> >>> http://portal.acm.org/citation.cfm? > id=1516632&dl=GUIDE&coll=GUIDE&CFID=58206374&CFTOKEN=27403333 >> >> Could have been titled "C considered harmful". > > Not really. But integers are a range from a to b and b-1+1=a. So all > numbers must be thought of as a number x mod b. In assembly it is not > unusual to do this deliberatly. You're just saying that there's a syntactic misdesign in C here (and of course, all following suit languages). The syntax should have been: l-value ⣠r-value [4294967296] instead of: l-value = r-value People are constantly complaining that (+ a b) is not the syntax of maths. But C { c=a+b; } is not the syntax of math either. It would have to be: { c ⣠a+b [4294967296]; } So I stand, this is a "C considered harmful" paper. -- __Pascal Bourguignon__ |