Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!whuts!mtune!rutgers!sri-spam!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: min and max, power, etc: no defined precedence Summary: done before Message-ID: <582@cresswell.quintus.UUCP> Date: 27 Jan 88 03:39:14 GMT References: <11182@brl-adm.ARPA> <2197@haddock.ISC.COM> <2336@haddock.ISC.COM> <1411@mips.mips.COM> Organization: Quintus Computer Systems, Mountain View, CA Lines: 23 In article <1411@mips.mips.COM>, hansen@mips.COM (Craig Hansen) writes: > In article <3930@hoptoad.uucp>, gnu@hoptoad.uucp (John Gilmore) writes: > > > > >What's the appropriate precedence for these operators? > > 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 have designed a language/compiler that has this precise feature for > ALL operators, and would just like to add that it's WONDERFUL. It not It's been half-done: Wirth tried to "simplify" Pascal by flattening the operator precedence. Dunno about you, but the result strikes me as a major pain. It's been done before: APL has been doing this for years. Remember APL: the language people keep screaming "unreadable" at? It's been done before: anyone remember PL/11? Anyone *like* PL/11? It's been done even better: Lisp has no operators... The problem in C is not so much the number of precedence levels, as that many operators cannot be distinguished by operand type. For example, letting x be any scalar variable, and y be any non-register variable, x&&&y is legal...