From david@imagine1.com  Wed Mar 12 05:01:00 1997
Received: from kitsune.swcp.com (swcp.com [198.59.115.2]) by dkuug.dk (8.6.12/8.6.12) with ESMTP id FAA15236 for <SC22WG5@dkuug.dk>; Wed, 12 Mar 1997 05:00:57 +0100
Received: from ppp121.swcp.com (ppp121.swcp.com [204.134.0.171]) by kitsune.swcp.com (8.6.9/8.6.9) with SMTP id VAA13346; Tue, 11 Mar 1997 21:00:40 -0700
Date: Tue, 11 Mar 1997 21:00:40 -0700
Message-Id: <199703120400.VAA13346@kitsune.swcp.com>
X-Sender: evt@swcp.com (Unverified)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: David Vallance <DMV@salford-software.com>,
        Lawrie Schonfelder <J.L.Schonfelder@liverpool.ac.uk>, SC22WG5@dkuug.dk
From: david@imagine1.com (David Epstein)
Subject: Replies to Dave Bailey and Salford
Cc: sc22wg5-coco@ncsa.uiuc.edu
X-Mailer: <PC Eudora Version 1.4>

>All C/C++ programs which use conditional compilation extensively 
>become ugly and unreadable.

Much thanks to Dave Bailey and Salford for the note about CoCo.

Nothing could have been more clearly put as an argument for having
a standardized conditional compilation in Fortran.  The note hints
that cpp is bad and at the same time directs the Fortran programmer 
to use cpp since we are not going to offer something better.(?)  

To me, the note clearly points out that if we do not offer a 
standardized feature for conditional compilation, the Fortran
programmer will go and grab cpp as a poor solution to a simple problem.

 (1) Enough cannot be said for the Salford team that has put together
     the ClearWin GUI tool for Fortran programmers ... truly an
     effort that shows dedication to Fortran and its future.

     My public reply to your note is based on my absense at the recent
     X3J3/WG5 meeting in Las Vegas, where comments may have gone 
     unanswered.  Thus, I am taking
     this opportunity to offer more backing for conditional compilation.

 (2) Unfortunately for the Fortran standardization effort, most every
     Fortran90 compiler (that I know of) is written in
     C, leaving the compiler writer's opinions of "what not to do"
     biased in favor of avoiding the pain and ugliness of C.

     Fortran is not C, let's keep it that way.

 (3) I believe the above copied sentence must be changed to:

>All C/C++ programs which use cpp extensively become ugly and unreadable.
                              ^^^
                              |||

Looking at large C/C++ programs is not a pretty sight, and cpp does
not help.  cpp allows the programmer to hide information behind hard
to find and read macros, often in an effort to save the overhead of 
a function call.  Since the C programmer didn't have a constant (spelled
PARAMETER in Fortran) and the C/C++ programmer needed an #include (spelled
INCLUDE in Fortran), using cpp was a must.

The point is clearly made that cpp is bad (although some attempted to slow
the process of standardizing CoCo by first claiming that CoCo is not
enough and that a whole preprocessor is better, followed by an argument
that a whole preprocessor is bad, so we best drop the whole thing--leaving
Fortran right where we started, in need of conditional compilation for
portability.)

*** There is one feature of cpp that is needed ... conditional compilation.

So, why write code in C/C++ instead of Fortran?  
The perception is that C is portable.  
Why is C more portable than Fortran?
For one, they have conditional compilation and we don't.

 ***
Any note that disagrees with standardizing conditional compilation in
Fortran is incomplete if it does not discuss the alternatives.  
Every available alternative is unsafe, unFortran, unportable, 
and most of all unstandard.
 ***

If the words:
>All C/C++ programs which use conditional compilation extensively 
>become ugly and unreadable.
were truly meant to say "conditional compilation" and not "cpp", I
ask what this code would look like if conditional compilation was
not available in cpp?  Possibly many files would be used and updated
in parallel instead of using conditional compilation?  Perhaps the C
programmer would go fishing and end up using the PL/I preprocessor?


SUMMARY
The question is not whether the compiler writers like myself are sick 
of looking at unreadable C/C++ code, the question is how to provide 
the Fortran programmers with the tools necessary so that they do NOT 
have to use cpp to obtain conditional compilation.  Telling the Fortran 
world to use cpp will surely create the situation where they will.

David

