why bother with operator precedence

Herman Rubin cik at l.cc.purdue.edu
Wed Mar 28 02:03:49 AEST 1990


In article <1379 at ux.acs.umn.edu>, tongwu at ux.acs.umn.edu (Tong Wu) writes:
> In article <12845 at csli.Stanford.EDU> poser at csli.stanford.edu (Bill Poser) writes:
< >Insisting that students use minimal parenthesization will help them
< >......
< >
< >So, why bother with precedence?
 
> An excellent point!  Using minimal parenthesization to achieve maximal use
> of precedence rules is like not declearing variables, in Fortran, in order
> to use the default variable types.
 

It is much worse.  The precedence rules in algebra are well known, but the
arbitrary ones in C are not, and are not intuitive.  What is the precedence
for 

		a << b + c 

-- 
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907
Phone: (317)494-6054
hrubin at l.cc.purdue.edu (Internet, bitnet, UUCP)



More information about the Comp.lang.c mailing list