Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!zodiac!joyce!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.misc Subject: Re: Expression syntax in programming languages. Keywords: C FORTRAN exponentiation Message-ID: <159@quintus.UUCP> Date: 8 Jul 88 21:00:20 GMT References: <3136@phoenix.Princeton.EDU> <19633@watmath.waterloo.edu> <5174@ihlpf.ATT.COM> <20520@beta.lanl.gov> <5239@ihlpf.ATT.COM> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 17 In article <5239@ihlpf.ATT.COM> nevin1@ihlpf.UUCP (00704a-Liber,N.J.) writes: >>If the presence of an exponentiation operator can be considered as an >>'error' in Fortran, then an inherently inefficient part of C can be >>considered 'broken'. > >Who said that the exponentiation operator is an error in FORTRAN? But just >because FORTRAN has it, that is no reason to believe that every other computer >language should have it. If it doesn't fit in well with the language >paradigm, then it shouldn't be kludged in. Guilty. Although what I actually said was that the exponentiation operator may be MISLEADING, not that its presence is an error. What I had in mind is that, although there is no _real_ difference between operators and functions (even '+' may be a subroutine), operators _look_ cheaper, and my claim was that because pow() in C _looks_ dearer than ** in Fortran (even though they are essentially the same) this _might_ encourage people using C to stop and think a bit, and that when you stop and think you often find that ** is not appropriate after all.