Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!cbmvax!daveh From: daveh@cbmvax.cbm.UUCP (Dave Haynie) Newsgroups: net.lang.c Subject: Re: Re: Precedent for use of = Message-ID: <499@cbmvax.cbmvax.cbm.UUCP> Date: Tue, 8-Jul-86 11:04:14 EDT Article-I.D.: cbmvax.499 Posted: Tue Jul 8 11:04:14 1986 Date-Received: Wed, 9-Jul-86 02:14:20 EDT References: <4824@sun.uucp> Organization: Commodore Technology, West Chester, PA Lines: 37 > Personally, I still prefer := for assignment and = for equality over = > and ==. I also think that the keystroke argument is ridiculous (flames > to /dev/null). The problem with = and == is further aggravated by the > fact that in C an assignment is an expression and not a statement, so > that code like > > if (i = 0) { > /* do something */ > } > else { > /* do something else */ > } > > is legal C and usually /* does something else */ than you expected :-) As long as you're writing in C, and you REALLY know the language, the above construct would be ridiculous. I think that most of the folks that are unhappy with the way that C handles = and == are frustrated Pascal hackers who can't quite adjust to the power and terseness of C. Maybe if they'd spend a few extra hours LEARNING C instead of trying to write Pascal in C, they'd be much better off. I've had no trouble switching to := and = for Pascal and M2, = and .EQ. for Fortran, = and = for BASIC, = and EQ() for SNOBOL, MAKE and = for LOGO, (LET ), (SET ), (SETQ ) and (EQ ), (EQUAL ) in LISP, or even MOVE and CMP in Assembler. My point is instead of tripping over the language syntax and screaming how it should be changed, one can learn the language and then not have to worry about tripping over it. And then you might even start to realize why a particular method has its advantages. -- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Dave Haynie {caip,ihnp4,allegra,seismo}!cbmvax!daveh A quote usually goes here, but its currently being rennovated. These opinions are my own, though for a small fee they be yours too. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/