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,c7d533acec91ae16 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Question for the folks who designed Ada95 Date: 1999/04/28 Message-ID: #1/1 X-Deja-AN: 471923887 Sender: bobduff@world.std.com (Robert A Duff) References: <7g2qu4$ca4$1@usenet.rational.com> <3725F4F1.7B615767@rocketmail.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-04-28T00:00:00+00:00 List-Id: Corey Ashford writes: > Thanks, I did find that reference after posting, but I found the > explanation lame. They didn't want to introduce a new > operator syntax and didn't want a function with a name > part of the language definition. > How was the max and min functions handled? With attributes... > I don't see how this case is really any different. You're right. I'm not sure we ever thought about attributes, though it seems obvious now. Two other issues: We didn't think it was necessary -- you can always multiply by 2 or whatever. Optimizing that to a shift instruction is trivial, and if you care about efficiency, surely you should be using an optimizing compiler that is *at least* that smart. (After all, I want that optimization for signed integers, too!) It's not clear what shifting should mean if the modulus is not a power of 2. Robert has stated many times that that should never have been allowed, and I tend to agree. - Bob -- Change robert to bob to get my real email address. Sorry.