On Thu, 11 Dec 1997, Roger Glover wrote:
> one of my C++ classes. He said, "This operator overloading
> stuff is sure a lightyear or two from Fortran." I said,
> "Fortran has operator overloading." He said, "Don't try to
You might have pointed out that Fortran has _better_ operator overloading
facilities. In Fortran you can overload existing operators or choose
names for your own, e.g. .IN. or .UNION. if you are handling sets, or
.LIKE. if you are doing wildcard matching of strings, and so on. And each
of these names can be overloaded for intrinsic or defined data types and
can be a binary or unary operator. Using C++ the best you do is to
overload one of the existing set of operator names and its arity cannot be
changed (as far as I know, I'm not a C++ expert). I admit that C++
has rather more operators than Fortran, but in many cases one finds that
none of them look at all appropriate from a semantic point of view, which
can make the code very hard to understand.
--
Clive Page,
Dept of Physics & Astronomy,
University of Leicester,
Leicester, LE1 7RH, U.K.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|