Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!hoptoad!gnu From: gnu@hoptoad.uucp (John Gilmore) Newsgroups: comp.lang.c Subject: Re: min and max, power, etc: no defined precedence Message-ID: <3930@hoptoad.uucp> Date: 25 Jan 88 15:47:39 GMT References: <11182@brl-adm.ARPA> <2197@haddock.ISC.COM> <2336@haddock.ISC.COM> Organization: Nebula Consultants in San Francisco Lines: 20 > > >What's the appropriate precedence for these operators? Bog forbid that any new operators get added in the last-minute rush to a standard -- they'll probably end up like the bills that get passed by Congress on the last 3 days of the session. Trash, badly thought through, passed because somebody owed somebody else a favor. But if any operators *DO* slip through, I recommend that they have *NO DEFINED PRECEDENCE*. That's right, we don't need to make C's 11-level precedence into a 12-level precedence. Force the user to fully parenthesize any new operator, else the compiler rejects the expression. (I was an early convert to APL -- in which all functions have the same precedence. It was easy to read once you got the hang of it -- sort of like "infix polish notation". I still have to dig out reference manuals to figure what C should do -- when it isn't obvious, I just parenthesize instead. For new operators it is by definition not obvious.) -- {pyramid,ptsfa,amdahl,sun,ihnp4}!hoptoad!gnu gnu@toad.com "Watch me change my world..." -- Liquid Theatre