Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!rochester!cornell!uw-beaver!apollo!mrst!sdti!turner From: turner@sdti.SDTI.COM (Prescott K. Turner) Newsgroups: comp.lang.misc Subject: Re: first class functions (opps) Summary: floating point analogy not persuasive Message-ID: <452@sdti.SDTI.COM> Date: 10 May 89 02:37:00 GMT References: <10253@orstcs.CS.ORST.EDU> <2400023@otter.hpl.hp.com> <451@sdti.SDTI.COM> <529@rodan.cs.utexas.edu> Reply-To: turner@sdti.UUCP (0006-Prescott K. Turner, Jr.) Organization: Software Development Technologies, Sudbury MA Lines: 31 In article <529@rodan.cs.utexas.edu> steveb@cs.utexas.edu (Steve Benz) writes: > Then again, you really shouldn't compare floating point numbers for equality > either. I've done enough numerical programming to know that this is true 99% of the time. > Can we conclude that floating point numbers aren't first class? I don't buy that. Every language with a successful floating point type has comparison for equality. For several years I helped support a FORTRAN compiler which could handle X = A * B Y = A * B IF (X .NE. Y) ... and execute this statement! Try telling customer after customer that this is their problem. Floating point should be first-class, with equality in the sense these customers wanted. > Clearly, no. Some operators apply to some data types, and don't apply to > other types. Functions are first class objects in Scheme, but they really > shouldn't be compared for equality--just the same as real numbers shouldn't > be compared for equality. Ah, yes. Real numbers of the mathematical kind are much more like Scheme functions than that FORTRAN stuff. But I'm not acquainted with Macsyma, etc. so it sounds to me as if you're just trying to extend what's mostly true for floating point to a quite different beast. ----- Prescott K. Turner, Jr. Software Development Technologies, Inc. P.O. Box 366, Sudbury, MA 01776 USA (508) 443-5779 UUCP: ...{harvard,mit-eddie}!sdti!turner Internet: turner@sdti.sdti.com