Re: A petition to J3 apropos FORTRAN's future

From: Ed Wells (wellsed_at_wam.umd.edu)
Date: 02/26/04


Date: 26 Feb 2004 14:33:19 -0800

analyst41@hotmail.com (analyst41) wrote in message
>
> Think of this
>
> Minimizing a convex function, minimizing a linear function (both
> convex and concave) and minimizing a concave function subject to
> constraints - are for all practical purposes unrelated problems.
>
> What good is it to define a "class" or whatever of fucntions by their
> concavity/convexity and try to develop generic algortihms.

You're right, those three types of routines are probably not
well-suited to develop a general concavity/convexity class.

Any one of them, however, is well suited to be written as a routine
that finds the concavity/convexity of a scalar "class": integers,
reals, complex reals, and some user-defined types.

>
> And finally, the oft-quoted advantage of "generic programming" that
> you don't need to duplicate code for sorting real numbers and for
> sorting integers - is this trivial gain worth increasing the
> compiler's complexity ?

For my application in Computational Crystalography it is worth having
generic procedures that deal with objects to embody atoms, symmetry
operations, direct-space lattice vectors, reciprocal-space lattice
vectors, and some other "classes" that extend the functionality of
these basic "classes". My generic procedures must be able to read,
write, sort, rank, and initialize each of these types. So, yes, it is
worth some added complexity to the comiler so that I don't have to
remember every special name for every procedure.

Also, think of ELEMENTAL procedures that allow you to write a single
routine that can take input as a scalar up to an arbitrarily shaped
and sized array. I think that's a very object-oriented approach.

Really, and truly, I've read your opinions for some time on this list
and they amount to one thing: you simply don't like or agree with the
direction of Fortran. That's your right, but you don't have to come
here and shout it everytime you misunderstand and don't see a direct
use for features that others use on a regular basis. Don't use those
features you consider bloat and move along with business.