[log in to unmask] wrote:
> Fortran faces extinction threats from C/C++ and Java
Possibly true.
> Fortran exists only on account of people over 40
I seriously doubt that.
> Fortran's real appeal is its cultural continuity with
> Gauss, Euler etc.
Oh, come on now. This is just preposterous!
> We have centuries of mathematical CULTURE (a term that
> might make the barbarians on this board uncomfortable) that
> has pretty much 'codified' i,j,k,l,m,n as integer
> indices of summation.
In any FORMAL statement of mathematics, *all* variables are
"explicitly typed." Have you ever seen anything like "Let A
be a real square matrix of order N, where N is a Natural
Number."? That is explicit typing. Informal statements of
math may use common coventions, but formal statements of math,
the ones that really count, define the meaning of all
variables used.
> Fortran was used for safety-critical code YEARS before
> Programming was turned into something barbaric with
> Pascal (yes, Pascal),
Niklaus Wirth, creator of Pascal, was originally trained as
an electrical engineer. He became interested in computer
software and languages through his study of numerical
analysis, a "mathematical" discipline:
http://www.cm.cf.ac.uk/User/C.J.Plastow/project/wirth.html
> and its UNSPEAKABLE descendants such as C.
Dennis Ritchie, creator of C, is a PhD mathematician:
http://cm.bell-labs.com/cm/cs/who/dmr/bigbio1st.html
One might say that these "barbarians" have had a great deal
of exposure to the "culture" you espouse.
Your argument is seriously flawed in other ways as well.
Coal-fired steam engines carried "safety-critical" passenger
rail and ship traffic long before diesel and electric engines
were invented, but that does not mean that they are "safe"
by today's standards.
> All this debate how we can make Fortran into a stilted
> 'me too' imitation of C/C++ is so laughable if it were
> were not so pathetic. What are they going to do with
> such a monstrous, bloated Fortran - write Interactive
> games, operating systems, telephony software ???????
Or maybe write high energy physics simulations orders of
magnitude more complicated than before, like the group at
University of Texas has been doing with their C++ code...
Or maybe write 3D stack depth migration modeling of seismic
data like at least two oil companies I know of are doing
with their C++ code...
Or maybe write code to model antenna signatures under
battlefield conditions like a former student of mine is
doing with his C++ code...
Or maybe write flexible derivatives forecasting models like
the folks at Merrill-Lynch are doing with their C++ code...
All of these are cases of expert Fortran programmers who
now write floating-point, computationally-intensive code in
C++. And why? Because Fortran does not provide them with
the tools they need to write the kinds of codes they are
being called upon to write.
> Case in point - the sidesplittingly funny debate on
> new logical operators
>
> here is my candidate the AND.THEREFORE.BUT.BECAUSE operator
>
> Fortran will survive if and only if it remains a SMALL
> language,
Fortran 90 already made Fortran a much "larger" language
than C (although significantly "smaller" than "C++"). If
you already realize this your point must be that Fortran
is already dying, at least relative to C. Of course, many
would say that C is dying relative to C++, which is
monstrously larger than either C or Fortran.
Having said that, I would love to see Fortran made smaller,
and deletion of redundant obsolescent features is the only
real hope for making that happen.
> designed to express quantitative computation
> elegantly
^^^^^^^^^
To my way of thinking, elegant expression of computation
first became possible in Fortran with Fortran 90 array
syntax, derived types, and operator overloading.
> and can be compiled with an elegant compiler
^^^^^^^^^^^^^^^^
Fortran 90 free source form certainly improved the
"elegance" of the compiler's parsing functionality!
> to generate efficient code.
^^^^^^^^^^^^^^^^^^^^^^^
Now this is an interesting juxtaposition. In my
experience, a compiler's "elegance" varies inversely
with its power to optimize code.
> That having been vented, here is my argument for implicit typing
>
> Those geeks/barbarians who need to type every variable
> EXPLICITLY,
>
> i.e they'll need to say Ax = b
>
> Where A might be character, x might be complex and b logical
> let them use implicit none.
But this is EXACTLY what "real" mathematicians do when they
write such a statement in their formal work.
> For the few civilized souls who would naturally use A and b
> as real DATA and x as a real VARIABLE, implicit real typing
> is just fine thank you.
What about the elegant, civilized mathematicians who would
find it most natural for all three to be complex? Why do
we discriminate against them?
And what of those refined mathematical souls who would like
to refer to:
- the identity matrix "I"
(after Householder and numerous others)
- the imaginary unit "i" or "j"
(I think Euler preferred "i")
- the mass "m"
(Newton and Einstein being the obvious examples)
- the physical constant "k"
(A favorite of German scholars, Boltzmann being the
example that comes to mind first)
- the unit normal vector "i"
(found in Swokowski's "Calculus, with Analytic Geometry")
Why must they declare their variables, when the type is
"obvious" from the context of usage?
> In other words, implicit typing INVITES and does not FORCE
> coding standards - a great help if one has to maintain code
> written by another.
>
> i, j, k used as summation indices without explicit typing
> is SAFER than
>
> 'rumpelstiltskin' used as an index and declared as integer
> hundreds of lines away in the code.
Why? If I spell "rumpelstiltskin" differently on usage than
on declaration, in C the compiler will not allow the code to
pass. On the other hand, if I accidentally double-type "II"
instead of "I" as my index in Fortran, the compiler will let
everything go as if nothing were wrong.
But, even allowing that, this whole line of reasoning is
seriously flawed. What percentage of all names are
"indices"? The far more serious issue is with implicit
typing of array, scalar, and function names.
> If you ask me if I'd be comfortable if the nuclear reactor
> that supplies my power was controlled by Fortran Code that
> had implicit typing, I'd say yes.
*I'd* say I would have to know a great more about the control
system than the language in which the software was written
before I could answer such a question intelligently.
By the way, the Navy "reactor safety" experts at that I have
taught at Bettis and KAPL have been among the biggest boosters
of "IMPLICIT NONE" that I have seen anywhere.
And William Clodius of Los Alamos, whose ".ANDTHEN."
suggestion you ridiculed above, may know a thing or two about
nuclear codes himself. He can certainly speak for himself on
this issue, but, based on my observations of him in this forum
and elsewhere, I doubt he is a big fan of implicit typing.
> A simple Flag that will list out ALL IMPLICITLY typed
> variables is ALL that is required to make implicit typing
> 'safe'.
A visual check of hundreds-to-thousands of variable and
function names does not sound "safe" to me.
-------- Cray Research --------- Roger Glover
-- A Silicon Graphics Company -- http://home.cray.com/~glover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|