[comp.lang.fortran] operator syntax

fouts@lemming.nas.nasa.gov.nas.nasa.gov (Marty Fouts) (09/20/88)

The comment that exponentiation requires mathematical operator syntax,
and that Fortran has such syntax but C doesn't is silly. Putting on my
mathematician's hat -- my degree was in Math after all -- I would like
to point out that *neither* of these languages have decent operator
syntax for anything but trivial forms of operators and that from a
mathematician's point of view it is silly to think of them as
otherwise.  Unless of course you are arguing that we should all
program in APL or FP because they have appropriate notation.

It isn't entirely the fault of the language designers.  Early data
entry gear had limited character sets.  Current gear is better, but
not much.  Consider that Fortran allows:

1) infix binary arithmatic operators
2) prefix unary arithmatic operators
3) multiple valued "function" references  - using alphabetic function
   names

(I pick on Fortran because it has a smaller set of allowed operators
 than C, and it is easier to enumerate them.) Then consider that the
subscript is an operator, as is the integral sign, del, etc.  I can't
even state a PDE in most computer languages because they don't handle
the concept of operator well, and most of the ones I can do it in use
some kind of textual representation:

partial(u,x,1) + partial(u,x,2) + f(u) = g(u)

to represent the Helmholtz equation, for example.

Marty
+-+-+-+     I don't know who I am, why should you?     +-+-+-+
   |        fouts@lemming.nas.nasa.gov                    |
   |        ...!ames!orville!fouts                        |
   |        Never attribute to malice what can be         |
+-+-+-+     explained by incompetence.                 +-+-+-+