Path: utzoo!attcan!uunet!husc6!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.lang.c Subject: Re: why bother with operator precedence Message-ID: <2031@l.cc.purdue.edu> Date: 27 Mar 90 16:03:49 GMT References: <2205@osc.COM> <340018@hplvli.HP.COM> <19356@megaron.cs.arizona.edu> <1379@ux.acs.umn.edu> Organization: Purdue University Statistics Department Lines: 22 In article <1379@ux.acs.umn.edu>, tongwu@ux.acs.umn.edu (Tong Wu) writes: > In article <12845@csli.Stanford.EDU> poser@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@l.cc.purdue.edu (Internet, bitnet, UUCP)