Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!ptsfa!ihnp4!ihlpf!nevin1 From: nevin1@ihlpf.ATT.COM (00704a-Liber) Newsgroups: comp.lang.c Subject: Hypothetical discussion of changing operator precedence (was: priorities of = and == revisited) Message-ID: <3586@ihlpf.ATT.COM> Date: 3 Feb 88 01:30:26 GMT References: <1175@ark.cs.vu.nl> <1670010@otter.hple.hp.com> Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 31 In article <1670010@otter.hple.hp.com> kers@otter.hple.hp.com (Christopher Dollin) writes: >"nevin1@ihlpf.ATT.COM 00704a-Liber at AT&T Bell Laboratories - Naperville" says >> The =OP to OP= was a syntactic change, while changing the operator >> precedences would be a SEMANTIC change. > >Nope. It's syntactic. All precedences do is allow you to omit grouping marks >(parens). Grouping is just syntactic. > >Changing the operator MEANINGS would be semantic ............................ I'm not really sure what the division between semantics and syntactics is. In one perspective, the C language itself is only a shorthand (syntactic) notation for assembler. All computers really do is syntactic manipulation; all the meaning put in them is done by humans viewing them. If I changed * to MEAN addition and + to MEAN multiplication (changing the precedence, etc.), have I really done a semantic change? It is very easy for me to describe this syntactically. New point (assuming operator precedence changes is syntactic): If the honoring of parens becomes part of the ANSI C language, then changing operator precedence would almost definitely become a semantic change. Parens would no longer be just 'grouping marks'; they would force order of evaluation. I do not think that their would be a way of describing the old precedence rules in terms of the new language. -- _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 ' ) ) "The secret compartment of my ring I fill / / _ , __o ____ with an Underdog super-energy pill." / (_