Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!agate!shelby!decwrl!decvax!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Another silly question Message-ID: <13234@haddock.ima.isc.com> Date: 20 May 89 22:33:08 GMT References: <17812@cup.portal.com> <607@kl-cs.UUCP> <749@mccc.UUCP> <1657@auspex.auspex.com> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 15 In article <1657@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >[K&R and the pANS agree that a[i]==i[a],] so further discussion on whether >they're equivalent in C is pointless - they are, and that's that. If >somebody wants to debate whether they *should* be equivalent, they can, but >they're then talking about D or P, say, not C. Or maybe ANSI C in a nearby parallel universe. I thought it strange that X3J11 outlawed "x+ =1" ("+=" is now a single token), but permitted "i[a]" (on the grounds that they "saw no reason to forbid it"). Neither construct is ever used outside the IOCCC, and outlawing "i[a]" would have been a small step towards making arrays higher-class citizens than they are. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint (To anyone who's itching to say that i[hairy_array_expression] avoids a pair of parentheses: if you code that way, I spit on your grandmother's shadow.)