Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.scheme Subject: Re: ML-like type-checker for Scheme subset? Message-ID: <5808@goanna.cs.rmit.oz.au> Date: 17 May 91 09:36:16 GMT Article-I.D.: goanna.5808 References: <5710@goanna.cs.rmit.oz.au> <1065@sys.uea.ac.uk> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 22 In article <1065@sys.uea.ac.uk>, jrk@sys.uea.ac.uk (Richard Kennaway) writes: > In <5710@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: > > -- the idea that programming language implementations are entitled > > to quietly deliver incorrect results (Pascal implementations > > are often like this, and C implementations almost always are) > > What are you referring to here? In most Fortran, Pascal, C, ... implementations I have used, you can add two positive numbers and get a negative number. If you read the Fortran, Pascal, and C standards with sufficient care and attention, you will see that quietly delivering the wrong answers to integer arithmetic operations like this is _legal_. Implementations are _also_ free to report overflows (nice one, MIPS!) but often don't. Indeed, some systems makes it hard to _notice_ the overflow. (For example, one Pascal compiler I used on a 68010 _did_ generate code to trap on overflows, but the support routines for 32-bit multiplication and division forgot to set the V flag.) I like rationals, but I *love* bignums. -- There is no such thing as a balanced ecology; ecosystems are chaotic.