Re: What can be done in FORTRAN that cannot be done in C/C++?

From: Gary L. Scott (garyscott_at_ev1.net)
Date: 07/03/04


Date: Sat, 03 Jul 2004 10:06:23 -0500

Ken Plotkin wrote:
>
> On 2 Jul 2004 07:39:30 -0700, gary.l.scott@lmco.com (Gary Scott)
> wrote:
>
> >? We've just made it "standard" in my argument so the non-standard
> >behaviour is now to assume implicit none. User's with old code (F95
> >compliant) simply use a switch to get the old behaviour. What's so
> >hard about that?
>
> If something is declared to be standard, then it really takes more
> than a whim to declare it to be non-standard. People count on
> standards - the the very idea of a standard it that it defines the
> accepted way of doing things, one that will be stable. Arbitrarily
> change things, and there is no point to standards.
>

I agree generally, but this choice was just plain wrong. Fixing things
that are just plain wrong is acceptable in my opinion (those last three
words being of course key here).

> I suppose I should be confused by the denigration of Fortran's
> implicit typing. I find the implicit rule that i-n is integer and
> other letters to be real to a tremendous asset. Ihave been involved
> with one program for almost 30 years that was originally written by
> someone else, that does not follow that rule. Having to flip back to
> the declarations to see what type a variable is constantly drives me
> nuts.

Implicit typing has never been a major cause of error for myself,
however most arguments that I've heard indicate that it can be a major
or at least significant source of errors. It is considered by most to
be bad practice. I tend to disagree in that I very much LIKE default
behaviors (especially when it comes to things like GUI APIs). All you
need to do is memorize (or have reference for) those default behaviors.

>
> Doesn't anyone else consider consistent naming of variable so their
> type is apparent to be a Good Thing, worthy of being standard?

I personally use it all the time for quick and dirty tests and such.
However a command line switch to get that behavior would be of
exceedingly minimal bother. I am perfectly happy if it only applies to
free form source also since that's where I think the mistake was made
and that would impact far fewer applications.

>
> Ken Plotkin

-- 
Gary Scott
mailto:garyscott@ev1.net
Fortran Library:  http://www.fortranlib.com
Support the Original G95 Project:  http://www.g95.org
-OR-
Support the GNU GFortran Project:  http://gcc.gnu.org/fortran/index.html
Why are there two?  God only knows.
Democracy is two wolves and a sheep, voting on what to eat for dinner...
Liberty is a well armed sheep contesting the vote. - Thomas Jefferson


Relevant Pages

  • Re: help w/ c/c++ problem
    ... You may also declare mainas void if it does not ... You are therefore free to declare mainas required ... for which this International Standard imposes no requirements ...
    (comp.lang.c)
  • Re: Where is behavior AI now?
    ... representation of a switch closure, ... history of what has been happening, even if that history is only the switch ... the past 5 switch transitions of data. ... behaviors (oh, ...
    (comp.robotics.misc)
  • Re: Where is behavior AI now?
    ... of a switch closure, ... something, like the bump switches, increases the information content in ... than the desired reading. ... behaviors (oh, ...
    (comp.robotics.misc)
  • Re: kids and their furniture?
    ... I would always honor and respect any house rules I was ... standards that differed significantly from the range of behaviors ... I think it's pretty close to the legal 'reasonable person' standard. ... too much work to reason one's way through every single ...
    (misc.kids)
  • Re: Java Reflection compared to Lisp? (quite long - sorry!)
    ... > information provided to declare available at run-time? ... That'll be portable but not standard. ... CL error handling is much more expressive than Java (documented in the ... Quality control, n.: ...
    (comp.lang.lisp)