From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c1131ea1fcd630a X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: To Initialise or not Date: 1996/05/03 Message-ID: #1/1 X-Deja-AN: 152781167 references: <318508FE.204B@sanders.lockheed.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-05-03T00:00:00+00:00 List-Id: In article , Keith Thompson wrote: >Because it's much more straightforward for access types (and for >floating-point types: NaN, Infinity, etc.) than for integer types. >It's easy to reserve as many special access values as you need. Users -- >and hardware -- tend to expect each possible bit-pattern of an integer >object to represent a valid integer value. When I say "type T is range 1..1_000_000;", there are *plenty* of extra bit patterns for the compiler to use. You're correct in those cases where the range of the integer type matches the hardware, of course. >...You could reserve the most >negative integer in a two's-complement representation, but that gets >complicated in the absence of hardware support. Complicated? It gets inefficient, that's for sure. And it's annoyance if you need the value -2**31. But it doesn't seem particularly complicated for the compiler writer. - Bob