Fortran or Ada or PL/I? 
Author Message
 Fortran or Ada or PL/I?

In that post, some remarks are made about Ada, fortran, and C++.

Some readers might like to know how PL/I stacks up against those three
languages.

Quote:
> A friend of mine (a computer engineer who uses C++) insists that Ada95
> is the best programming language for scientists and non-computer
> engineers . His reasons:
> 1. Packages (modules) of related types, objects, and operations can be
> defined.

PL/I provides a package facility.

Quote:
> 2. Packages and types can be made generic (parameterized through a
> template) to help create reusable components.

In PL/I generic procedures can be created.  It's comparable to
that which is available in Fortran.

Quote:
> 3. Errors can be signaled as exceptions and handled explicitly.  Many
> serious errors (such as computational overflow and invalid array
> indexes) are automatically caught and handled through this exception
> mechanism, improving program reliability.

Only some classes can be.  It is, however, fully supported by PL/I.

Quote:
> 4. Tasks (multiple parallel threads of control) can be created and
> communicate. This is a major capability not supported in a standard way
> by many other languages.

It is a facility that is supported by PL/I.

Quote:
> 5. Data representation can be precisely controlled to support systems
> programming.

Systems programming is supported by PL/I.  In fact, it was originally
designed to do so.  It's possible to examine and manipulate the individual
bits of any data type.

Quote:
> 6.A predefined library is included; it provides input/output (I/O),
> string manipulation, numeric functions, a command line interface, and a
> random number generator (the last two were available in Ada 83, but are
> standardized in Ada 95).

In PL/I the I/O is implemented as statements, not as fuctions.  There are
problems in implementing I/O as functions.  PL/I has a large library of
built-in functions, including a swag of date functions to deal with
the Y2K problem.

AFAIK, it's the first language capable of dealing with automatic
windowing of dates.

PL/I also has a random number generator.

Quote:
> 7. Object-oriented programming is supported (this is a new feature of
> Ada 95). In fact, Ada 95 is the first internationally standardized
> object oriented programming language.
> 8. Interfaces to other languages (such as C, Fortran, and COBOL) are
> included in the language (these have been significantly enhanced in Ada
> 95).

PL/I has standard links to other languages.

Quote:
> At least one Ada compiler (from Intermetrics) can generate Java
> Virtual Machine (J-code) from Ada, so people can use Ada to develop Java
> applets and applications.

> After reading these reasons, following questions came to my mind: (mind
> on an engineer who has to use F77/90, sometimes C)

> 1) I know some of these capabilities is already supported by the Fortran
> standard and some of them will be added to the next release...is Fortran
> late? How can I convince the new generation of engineers to wait for the
> next Fortran standard to have all of these capabilities?
> 2) Is there any comparison between performance of Fortran90/95 and Ada95
> compilers?
> 3) It seems that Ada is  the most popular language for safety-critical
> systems. Why Ada? Why not Fortran or C++? What makes Ada suitable for
> this kind of programming?

Indeed, why?  PL/I has better facilities than Fortran (which has limited
real-time facilities), C++, and even Ada for real-time programming.  It has
extensive error interception and recovery facilities.

- Show quoted text -

Quote:
> 4) What can Fortran offer to the engineers that Ada can't? (except
> backward and legacy code compatibility)
> Thank you in advance.
> Siamak Kaveh
> Mech./Nucl. Eng.
> Ecole Polytechnique de Montreal.



Sun, 11 Mar 2001 03:00:00 GMT  
 Fortran or Ada or PL/I?
On 23 Sep 1998 11:37:38, in comp.lang.pl1 and comp.lang.fortran,

:: 3) It seems that Ada is  the most popular language for safety-critical
:: systems. Why Ada? Why not Fortran or C++? What makes Ada suitable for
:: this kind of programming?

Quote:
>Indeed, why?  PL/I has better facilities than Fortran (which has limited
>real-time facilities), C++, and even Ada for real-time programming.  It has
>extensive error interception and recovery facilities.

What are the realtime facilities of PL/I and Fortran then?  Ada's realtime
facilities include (they lie on top of the ``ordinary'' concurrency features):

* dynamic priorities and the guarantee that the highest priority task that is
  eager to run is always dispatched to the processor (priority based preemptive
  scheduling and dispatching)

* priority ordered entry queues/control over the choice of open select
  alternatives

* relative and absolute delay (an implementation is required to state the
  lateness of delay statements, etc.)

* deadline handling by means of: asynchronous abort, timed/conditional entry
  calls, or delay alternatives (specifying deadlines as a property of a
  task (as in PEARL or Realtime-Euclid) is not possible)

* the possibility to impose certain restrictions (No_Task_Hierarchy, Max_Tasks,
  Max_Select_Alternatives, ...) to facilitate the construction of highly
  efficient tasking run-time systems

* a high-resolution, monotonic clock (no backward jumps)

* provisions for synchronous and asynchronous task control

* interrupt handling smoothly fitting into the concepts stated above

Regards,

Frank

--

       In a world without walls and fences, who needs windows and gates?



Sun, 11 Mar 2001 03:00:00 GMT  
 Fortran or Ada or PL/I?

Quote:


> In that post, some remarks are made about Ada, Fortran, and C++.

> Some readers might like to know how PL/I stacks up against those three
> languages.

But don't forget that the full PL/I language has no official standard.

This is a clear disadvantage of PL/I vs Fortran and Ada.

There is a subset that was standardized in 1976 by ANSI but the PL/I
ANSI committee has now disappeared.

In 1984, I have done some tests on an IBM mainframe comparing the
execution speed between a Fortran 77 program compiled with VS Fortran
with full optimization enabled and an equivalent program in PL/I
(strictly equivalent, no dynamic storage allocation) compiled
with IBM PL/I Optimizing (sic) Compiler (full optimization) and the PL/I
program was about 5 times slower. Thus, this compiler was far from
optimizing!

Regards,

Jean Vezina



Sun, 11 Mar 2001 03:00:00 GMT  
 Fortran or Ada or PL/I?

Quote:



> > > In that post, some remarks are made about Ada, Fortran, and C++.

> > > Some readers might like to know how PL/I stacks up against those three
> > > languages.

> > But don't forget that the full PL/I language has no official standard.

> The standard for the full language is:X3.53-1976.

> > This is a clear disadvantage of PL/I vs Fortran and Ada.

> What?

> > There is a subset that was standardized in 1976 by ANSI but the PL/I
> > ANSI committee has now disappeared.

> As well as the subset defined in 1977 x3.4-1977 there is also the
> 1987 standard General Purpose Subset X3.74-1987.

Thanks for the clarifications. But is there are new developments planned
for PL/I ?

Jean Vezina



Sun, 11 Mar 2001 03:00:00 GMT  
 Fortran or Ada or PL/I?

Quote:


> > In that post, some remarks are made about Ada, Fortran, and C++.

> > Some readers might like to know how PL/I stacks up against those three
> > languages.

> But don't forget that the full PL/I language has no official standard.

The standard for the full language is:X3.53-1976.

Quote:

> This is a clear disadvantage of PL/I vs Fortran and Ada.

What?

Quote:

> There is a subset that was standardized in 1976 by ANSI but the PL/I
> ANSI committee has now disappeared.

As well as the subset defined in 1977 x3.4-1977 there is also the
1987 standard General Purpose Subset X3.74-1987.

Quote:
> In 1984, I have done some tests on an IBM mainframe comparing the
> execution speed between a Fortran 77 program compiled with VS Fortran
> with full optimization enabled and an equivalent program in PL/I
> (strictly equivalent, no dynamic storage allocation) compiled
> with IBM PL/I Optimizing (sic) Compiler (full optimization) and the PL/I
> program was about 5 times slower. Thus, this compiler was far from
> optimizing!

I'd like to see that.  The code from the optimizing compiler
was pretty good.

Claims that the program was "equivalent"
need to be viewed with suspicion.  Three published "comparisons"
of PL/I with other languages were flawed, and when examined,
showed that the authors had overlooked some important aspects
that prevented full optimization!  In particular, they forgot to
specify the option "REORDER".  In one of the comparisons, they made
the error of suppressing a condition by using a null action instead
of disabling the condition!

Quote:
> Regards,

> Jean Vezina



Mon, 12 Mar 2001 03:00:00 GMT  
 Fortran or Ada or PL/I?


Quote:
>> In 1984, I have done some tests on an IBM mainframe comparing the
>> execution speed between a Fortran 77 program compiled with VS Fortran
>> with full optimization enabled and an equivalent program in PL/I
>> (strictly equivalent, no dynamic storage allocation) compiled
>> with IBM PL/I Optimizing (sic) Compiler (full optimization) and the PL/I
>> program was about 5 times slower. Thus, this compiler was far from
>> optimizing!

>I'd like to see that.  The code from the optimizing compiler
>was pretty good.

>Claims that the program was "equivalent"
>need to be viewed with suspicion.  Three published "comparisons"
>of PL/I with other languages were flawed, and ...

I have even heard of a comparison between COBOL and PL/1 (late 70s,
early 80s) in which the COBOL code won!  The PL/1 code was written to
use 100% STREAM I/O and the most inefficent choice of techniques was
made in every case.

Beware of comparisons where the programmer desires to cause a
particular outcome; we can be pretty damn ingenious.

Frank Clarke
Tampa Area REXX Programmers' Alliance (TARPA)
Member of the REXX Language Assn
  Join us at http://www/rexxla.org



Tue, 13 Mar 2001 03:00:00 GMT  
 Fortran or Ada or PL/I?

Quote:



> > > > In that post, some remarks are made about Ada, Fortran, and C++.

> > > > Some readers might like to know how PL/I stacks up against those three
> > > > languages.

> > > But don't forget that the full PL/I language has no official standard.

> > The standard for the full language is:X3.53-1976.

> > > This is a clear disadvantage of PL/I vs Fortran and Ada.

> > What?

> > > There is a subset that was standardized in 1976 by ANSI but the PL/I
> > > ANSI committee has now disappeared.

Yes, the very latest is the inclusion of the Millennium Language Extensions.
IBM's OS/2 PL/I compiler was the first compiler to use these --
even before the COBOL compiler.

Those extensions allow a program to use a 100-year date window,
so that comparisons and arithmetic operations can be performed
automatically on 2-digit year dates as if they were 4-digit years
(and automatically on mixed operations using 2-digit years and 4-digit
years.

There are also several new built-in functions for processing 2-digit years,
as well as altered functions to let them process 2-digit years (as well
as the 4-digit years that they already handle).

Declarations allow the "DATE" attribute, which is the means by which
the compiler handles automatic date windowing.

- Show quoted text -

Quote:
> > As well as the subset defined in 1977 x3.4-1977 there is also the
> > 1987 standard General Purpose Subset X3.74-1987.

> Thanks for the clarifications. But is there are new developments planned
> for PL/I ?

> Jean Vezina



Tue, 13 Mar 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Fortran or Ada or PL/I?

2. Fortran or Ada or PL/I?

3. Ada, Ada,Ada,Ada,Ada,Ada,Ada,Ada Development

4. Life cycle costs for FORTRAN+Ada vs. Ada

5. PL/I and Ada

6. Ada Versus PL/I - The debate continues

7. PL/SQL -> Ada

8. Wanted: PL/1 to Ada Translator

9. PL/M to Ada Translator Needed...

10. Wanted: PL/M to Ada translator

11. PL/M to Ada converter

12. Yet another Fortran example that can be translated to PL/I

 

 
Powered by phpBB® Forum Software