Subject: Re: CCL:Re: CCL:CCL:OOP

From: [email-masked] (Francisco Figueirido)
Date: Thu, 10 Feb 94 11:05:52 -0500

I have seen many comments on the "religious" issue of whether FORTRAN is
better than C or viceversa. It seems to me that the discussion is
misdirected. I must, at the start, say that I have strong bowel movements
whenever somebody mentions FORTRAN, so my comments below are also biased.

It is well known that FORTRAN code that deals with linear arrays is easier
to optimize than code written in C or C++ due to pointer aliasing in these
latter languages. It is also well known that most numeric codes spent most
of their time in simple computations (if I am mistaken I will appreciate
corrections). I would NEVER write a user interface or script interpreter in
FORTRAN, but I would seriously consider writing short routines that perform
most of the numerical work in FORTRAN (unless the C/C++ compiler allows me
to optimize the code, for example, with #pragma directives, to the same
extent as the FORTRAN compiler). I routinely write code that interfaces
pieces in C, C++ and FORTRAN on several machines (all UNIX compatible) and
have found no problems (at least as long as character strings are not passed
around). There is no need, in my view, to write a program all in ONE
language. The best design would exploit each language's strengths and work
to avoid its defficiencies. An important strength of C++ (maybe of any OOPL)
is that it allows the programmer to present a SIMPLE and NATURAL interface
that encapsulates all or most of the messy implementation details. This
makes it much better than C, and infinitely better than FORTRAN; but it can
also lead to inefficient code unless the design has been thoroughly thought
out.