Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!amdcad!lll-crg!topaz!bentley!kwh From: kwh@bentley.UUCP (KW Heuer) Newsgroups: net.lang.c Subject: Re: unary + Message-ID: <637@bentley.UUCP> Date: Fri, 14-Mar-86 11:05:13 EST Article-I.D.: bentley.637 Posted: Fri Mar 14 11:05:13 1986 Date-Received: Sat, 15-Mar-86 21:18:13 EST References: <1195@mmintl.UUCP> Organization: AT&T Bell Laboratories, Liberty Corner Lines: 17 In article <1195@mmintl.UUCP> mmintl!franka (Frank Adams) writes: >I have a suggestion for the C standardization committee. Rather than using >a unary + operator to force the order of evaluation, why not use a different >kind of parentheses; specifically, square brackets? [ example deleted ] Well, if you make any sort of syntax error on a line containing brackets, you're likely to get a confusing message from the compiler. I'm not sure I like either notation, but +() seems simpler to me. Here's a more fundamental question. Under what circumstances would you use this feature anyway? If my understanding is correct, it only forces the compiler to respect the parentheses; it does not force the enclosed expression to be evaluated before anything else, so y[i] = x[i++]; or case '-': push(pop() - pop()); (where pop() has a side-effect) are unpredictable even with +().