[comp.lang.c] Hypothetical discussion of changing operator precedence

nevin1@ihlpf.ATT.COM (00704a-Liber) (02/03/88)

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."
/  (_</_\/ <__/ / <_	These are solely MY opinions, not AT&T's, blah blah blah