home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.misc
- Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!apple!mumbo.apple.com!gallant.apple.com!badenov.apple.com!user
- From: nevin@apple.com (Nevin ":-]" Liber)
- Subject: Re: how to advocate new software/hardware features (Re: Hardware Support for Numeric Algorithms)
- Sender: news@gallant.apple.com
- Message-ID: <nevin-181192145941@badenov.apple.com>
- Date: Thu, 19 Nov 1992 00:10:31 GMT
- References: <TMB.92Nov16140138@arolla.idiap.ch> <BxtFoF.BGn@mentor.cc.pur <KERS.92Nov17090305@cdollin.hpl.hp.com> <Bxvs9I.L22@mentor.cc.purdue.edu>
- Organization: Apple Computer, Inc.
- Followup-To: comp.lang.misc
- Lines: 56
-
- In article <Bxvs9I.L22@mentor.cc.purdue.edu>, hrubin@pop.stat.purdue.edu
- (Herman Rubin) wrote:
- > What is the correct association in a << b + c?
-
- It associates as a << (b+c).
-
- > Everyone I showed
- > this to came up with the same answer; but that answer is wrong in C!
-
- Well, considering I NEVER saw the << operator symbol before using C, how
- could it be wrong?? I could see people getting it wrong if they think of
- the shift left operator as a power operator. A while ago I played around
- with changing the precedence of the C operators, but never found a
- different order that I was more comfortable with. If you really don't like
- the precedence rules, and since no one but you will ever, ever try to read
- your code, it is fairly trivial to write a preprocessor that inserts the
- appropriate parentheses the enforce any precedence rules you wish. How
- would YOU, Herman Rubin, define the precedence rules?? BE EXPLICIT!
-
- > One
- > cannot even get the compiler to consider spacing in resolving this.
-
- I'll leave the rebuttal for this to people with more free time on their
- hands. :-)
-
- > I
- > would just as soon go the the APL idea, which only distinguishers unary
- > and binary.
-
- So, why aren't you using APL??
-
- > It would help if we could get a more complicated set of
- > parentheses,
-
- Adding lots of complexity for negligible, if an, gain is a bad, bad idea.
-
- > or allow explicit temporaries to be used to break up the
- > operation stream;
-
- What stops you from doing this now??
-
- > Put one
- > precedence for unary operators and another for binary operators, or even
- > equate the infix notation x FOO y with !FOO(x,y); those of us who want
- > to use user-defined operators would find this a lot preferable to not
- > allowing them at all, even if we had to use parentheses all the time.
-
- Funny, I just don't see you getting along with 2 + 3 * 5 evaluating as 25
- instead of 17. Besides, don't you always complain that LISP has too many
- parentheses?? If you really want this stuff, it's fairly simple to write
- an infix -> postfix converter for LISP.
- ___
- NEVIN ":-)" LIBER, RISC Porting Specialist/Blue Meanie, Mac System Software
- email: nevin@apple.com paper: Apple Computer, Inc.
- voice: (408) 974-MIX1 20525 Mariani Avenue, MS: 81-GC
- AppleLink: BADENOV Cupertino, CA 95014
-