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,eda443e5aaf028c4 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Suprise of comparison result Date: 1999/10/19 Message-ID: #1/1 X-Deja-AN: 537970828 Sender: bobduff@world.std.com (Robert A Duff) References: <37fd7e17.0@news.pacifier.com> <7tk5d5$2qu$1@nnrp1.deja.com> <7tke70$lf4$1@ash.prod.itd.earthlink.net> <7udvrl$npq$1@nnrp1.deja.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-10-19T00:00:00+00:00 List-Id: Robert Dewar writes: > To test your understanding, what is the result of > > -5 mod 3 > > Most people get this wrong! Which indicates that (this part of) the language is poorly designed. But it could be fixed by changing the precedences -- you wouldn't have to make "-5" be a literal. It seems to me that unary operators should never be lower precedence than binary operators. Do you agree with this language design principle? - Bob -- Change robert to bob to get my real email address. Sorry.