Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!uunet!willett!dwp From: dwp@willett.UUCP (Doug Philips) Newsgroups: comp.lang.forth Subject: Re: Data determines correct operation? Message-ID: <1326.UUL1.3#5129@willett.UUCP> Date: 13 Jul 90 04:50:17 GMT References: <9811@pt.cs.cmu.edu> Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 41 In <9811@pt.cs.cmu.edu>, koopman@a.gp.cs.cmu.edu (Philip Koopman) writes: > > My current gut reaction is to reject without further examination > any language, system, or implementation that does not work > correctly when fed reasonable data sets (especially if not > documented to do so for extremely important reasons). I am tempted to agree with you here. When you see a system where something as fundamental as < isn't right, it doesn't do much for your confidence in other parts of the system. > I find definitions of the form "works with positive numbers only" > scary. How many outsiders share my fears? Remember, even if > C does not specify division at a very detailed level, common > practice is to use hardware-supplied division, and most (if not > all) machines do it the same way. I think that it is a very honest thing for the language documentors to tell you what the "underlying assumptions" are. That way you stand a much better chance of writing code that won't violate them. In this sense I agree with your decision about cmForth. You had to intuit the brokenness of < by looking at the code. This is just the thing that I also despise. Curiously, though, you seem to find the remedy of specifying the domain and range of the functions to be as bad? This confuses me. Certainly one wants to know that < will simply work, but I would find it much less scary if it were explicitly documented to work for ALL signed numeric arguments, rather than leaving that as an unsupported assumption to be made by the user. Violated assumptions are the hardest things to spot when debugging (at least for me). If they are written down they aren't really assumptions anymore and it is easier to spot the violations. Is it that "works with positive numbers only" is scary because you think that the author is lying, or is it scary because you didn't think it should be necessary to put such a restriction on it? Or am I missing some other reason? -Doug --- Preferred: willett!dwp@hobbes.cert.sei.cmu.edu OR ...!sei!willett!dwp Daily: ...!{uunet,nfsun}!willett!dwp [in a pinch: dwp@vega.fac.cs.cmu.edu]