JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for COMP-FORTRAN-90 Archives


COMP-FORTRAN-90 Archives

COMP-FORTRAN-90 Archives


COMP-FORTRAN-90@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

COMP-FORTRAN-90 Home

COMP-FORTRAN-90 Home

COMP-FORTRAN-90  1997

COMP-FORTRAN-90 1997

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Another 2 cents worth - for implicit typing

From:

Roger Glover <[log in to unmask]>

Reply-To:

Roger Glover <[log in to unmask]>

Date:

Wed, 10 Dec 1997 16:30:01 -0600

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (223 lines)

[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


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

December 2023
February 2023
November 2022
September 2022
February 2022
January 2022
June 2021
November 2020
September 2020
June 2020
May 2020
April 2020
December 2019
October 2019
September 2019
March 2019
February 2019
January 2019
November 2018
October 2018
September 2018
August 2018
July 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
December 2015
November 2015
October 2015
September 2015
August 2015
June 2015
April 2015
March 2015
January 2015
December 2014
November 2014
October 2014
August 2014
July 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
July 2013
June 2013
May 2013
April 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
August 2010
July 2010
June 2010
March 2010
February 2010
January 2010
December 2009
October 2009
August 2009
July 2009
June 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager