Re: Help from fellow Fortran Users

From: Bob Lidral (l1dralspamba1t_at_comcast.net)
Date: 02/02/04


Date: Mon, 02 Feb 2004 15:21:11 GMT

Jugoslav Dujic wrote:

> Bob Lidral wrote:
> [snipped various non-Pascal related pieces]
> | [snipped various Pascal-related pieces]
>
> Huh... you should've posted that in a pascal newsgroup >;).

You're probably half-right -- except that I believe I'm already treading
dangerously close to a flame-war. Inasmuch as I was replying to a post
by James Giles concerning relative portability of programs written in C
and Fortran in which he introduced the subject of Pascal, it seemed
reasonable to comment on Pascal as well. OTOH, my "comments" may have
strayed a little too far into the realm of advocacy (or, in this case,
anti-advocacy). In the '70s and early '80s, I endured a few too many
Disciples of St. Nik regularly and repeatedly bombarding me with
unsolicited idiotic double-think such as: one must write GOTO-less
Fortran (1966 standard), assembly language, and MIX algorithms and
Pascal is a useful, high-level, portable language that is easy to use
for any programming problem in any domain. Had I been able to avoid
them or had they shut up after the first dozen or so utterances of such
drivel, I probably wouldn't have minded so much, but several of them
were professors, co-workers, or even friends so there was no diplomatic
way to avoid them -- even changing the subject or refusing to argue the
points didn't seem to reduce their unrelenting, often irrelevant to
current discussion, repetitive, spontaneous pro-Pascal rants. So, I
apologize for my excessive anti-Pascal zeal in this newsgroup and offer
this as an explanation.

> The main keeper of Pascal nowadays is Borland with their Delphi variant
> of the language (formerly known as Object Pascal). Speaking as 1) hobbyist
> OO programmer 2) only occasional Delphi luser and 3) a programmer with
> no formal CS education, I must say that I think they did a good job in
> extending the language. There are several features I very like:
>
> - Concept of Units, quite similar with F90 Modules, but avoiding the
> potential "compiling cascade" problem (the price is that you have
> to redeclare the routine interfaces in unit header, but the compiler
> checks whether they match the implementation)
> - IMVHO very nice object model, with proper inheritance rules, and
> an appropriate set of keywords (inherited, override, virtual,
> reintroduce, abstract, dynamic etc.), and, as a Good Thing (TM),
> no multiple inheritance.
> - Good typecasting model with compile-time checkable feasibility
> - Variable-length strings and arrays
> - Support for C-style pointers (just in case you wanna toy with fire)
> - etc.
>
> Of course, it keeps the ugly and confusing syntax with non-intuitive
> rules regarding begin, end and use of semicolons, commas and dots,
> but I'm not saying it's perfect, and, being just an occasional user
> I'm (trying) not advocating it. But my point is, languages evolve,
> and your comments seem to address what was the Pascal in 70s.

Absolutely correct. My reply was to James Giles's assertions:

> As I've pointed out, I believe much of the lack of reliability of
> systems is directly tracable to C: a large percentage of bug in
> modern systems still turns out to be buffer overruns. C also
> tend to require more lines of code to do similar tasks than other
> languages - hence one of the causes of bloat. C is not a very
> good choice as a system development language. Many Pascal
> extensions used experimentally in the 70's would have been
> better choices.
>
Inasmuch as his comments considered extensions for Pascal in the '70s,
my reply addressed the state of the language during that time-frame.

> I render your comments in the same way as if someone would come
> preaching in c.l.f. that Fortran is a bloated and arcane language
> due to GOTO spaghettis, silly fixed-form code, three-way IFs,
> absence of dynamic allocation, Hollerith syntax for characters, etc.

Fair enough. However, the Pascal you describe with support for separate
compilations, OO extensions, strings, and variable-length arrays
(function arguments?) is a vastly different language from the Pascal
designed by Niklaus Wirth -- though perhaps a few (certainly not all) of
those extensions were under consideration in the '70s. It also differs
from the Pascal of the '70s by significantly more than the Fortran 1978
standard (called Fortran 77 but not finished quite on time) differs from
the 1966 standard. The Fortran 77 standard was extremely disappointing
in that it barely added to the standard the most important features
already included as extensions by almost all of the vendors (though, of
course, with widely-varying syntax) -- in fact the original proposed
version (March, 1976) didn't even include if-then-else.

Since the original comment by Mr. Giles explicitly referred to the state
of Pascal in the '70s, I thought my comments were appropriate to that
version of the language -- if not, perhaps, appropriate in length or to
this newsgroup. I'm not really interested in continuing this discussion
topic (I had quite enough of people trying to preach the virtues of
Pascal to me with religious zeal in the '70s and early '80s to last me
a lifetime) but if you wish to do so, I suggest we move it out of this
newsgroup to private email. However, if you do wish to discuss the
relative portability of Fortran, C, and Pascal by email, I suggest you
treat all three languages similarly; that is either compare Fortran 66
and Fortran 77 with C and the Pascal of the '70s or compare Fortran
90/95 with C++ and Borland's current OO Pascal.

Bob Lidral
l i d r a l at a l u m dot m i t dot e d u



Relevant Pages

  • Re: Criticisms?
    ... discuss some language that does, find a newsgroup for that language. ... extensions to C unless you want to talk about standardising them, ... No compiler AFAIK is normally used in PURE Standard C mode ... people who like the C philosophy. ...
    (comp.lang.c)
  • Re: Porting C software
    ... extensions are needed. ... to make them into the standard. ... every compiler extension that was used and found useful made it into ... add anything fundamental to the language. ...
    (comp.lang.c)
  • Re: Porting C software
    ... extensions are needed. ... to make them into the standard. ... every compiler extension that was used and found useful made it into ... add anything fundamental to the language. ...
    (comp.lang.c)
  • Re: Reading from a character array
    ... deltaquattro wrote: ... library is added to the next generation of the language, as for C++, ... Fortran doesn't use the word "library", ... Fortran standard doesn't tell you which negative numbers indicate ...
    (comp.lang.fortran)
  • Re: public comment on fortran 2008
    ... There are Fortran programmers who find even Fortran 90 too ... doesn't serve the user base to have the language always a moving ... language, it should be addressed by the standard with some urgency. ...
    (comp.lang.fortran)