Hypothetical discussion of changing operator precedence (was: priorities of = and == revisited)

00704a-Liber nevin1 at ihlpf.ATT.COM
Wed Feb 3 11:30:26 AEST 1988


In article <1670010 at otter.hple.hp.com> kers at otter.hple.hp.com (Christopher Dollin) writes:
>"nevin1 at 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



More information about the Comp.lang.c mailing list