Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ask ChatGPT

198 views
Skip to first unread message

gah4

unread,
Feb 15, 2023, 5:25:05 PM2/15/23
to
Since we all want to know whether Fortran of PL/I is better for scientific
programming, I decided to ask the reliable source: ChatGPT:

"It's difficult to make a definitive statement about whether FORTRAN or PL/I is "better" for scientific programming, as both languages have their strengths and weaknesses.

FORTRAN (which stands for "Formula Translation") has a long history of use in scientific and engineering applications. It has strong support for numerical computation, with built-in features for arrays and matrices, as well as a variety of mathematical functions. Many scientific libraries and packages are written in FORTRAN, and the language is still widely used in fields such as computational fluid dynamics, computational chemistry, and nuclear engineering.

PL/I (which stands for "Programming Language One") is a general-purpose programming language that was designed to combine the features of several other languages, including FORTRAN and COBOL. It has a broader range of capabilities than FORTRAN, with support for structured programming, string manipulation, and file handling. PL/I also has better support for non-numeric data types, such as strings and characters.

In terms of performance, FORTRAN is often considered faster than PL/I for numerical computations, due to its built-in support for arrays and matrices. However, modern compilers and hardware have narrowed this performance gap, and PL/I can still be used for scientific programming with reasonable performance.

Ultimately, the choice between FORTRAN and PL/I will depend on the specific needs of your project and the tools and libraries available for each language. Both languages have their strengths and weaknesses, and the best choice will depend on a variety of factors, such as the complexity of the problem being solved, the available hardware, and the expertise of the programming team."


I especially like the part about modern compilers and hardware
narrowing the gap. In not so many years, PL/I should pass Fortran,
if the trend keeps up!

Thomas Koenig

unread,
Feb 18, 2023, 6:03:39 AM2/18/23
to
gah4 <ga...@u.washington.edu> schrieb:

> I especially like the part about modern compilers and hardware
> narrowing the gap. In not so many years, PL/I should pass Fortran,
> if the trend keeps up!

What modern compilers are there for PL/I?

FortranFan

unread,
Feb 18, 2023, 8:37:06 PM2/18/23
to
The ChatGPT responses are rather similar for PL/I and C++ and even though both those working on the design of these languages have tried long and hard to make both of these the language "to do everything", the arc of history and ground reality has been remarkably different for the two languages.

However those humans who help the AI bot "learn" from the fed "data" don't appear to know how to place things in perspective and the resulting deficiency in the thought process is glaring in the two similar responses.

db

unread,
Feb 20, 2023, 10:37:28 AM2/20/23
to
That's what I was wondering.
I programmed in PL/1 for some years and liked it. What I
especially liked was the "on" feature, specifying a reaction
to an error.
I do text handling in Fortran, no great problems there.
--
Dieter Britz

Gary Scott

unread,
Feb 20, 2023, 11:58:32 AM2/20/23
to
Yes, text handling in Fortran is super easy. I've done some very
complex processing and formatting, input and output. There is often a
need to use trim though which can be a serious performance issue for
some uses. I tend to resort to keeping track of substring boundaries
manually in those cases to improve performance.

David Bourne

unread,
Mar 3, 2023, 11:35:15 AM3/3/23
to
On Monday, February 20, 2023 at 9:58:32 AM UTC-7, Gary Scott wrote:
> On 2/20/2023 9:37 AM, db wrote:
> > On 18.02.2023 12.03, Thomas Koenig wrote: .

ChatGPT will write the fortran.code for you too if you ask nicely :-)

write a bubble sort program for f77 using gfortran

and after asking if there was a better algorithm

write a quicksort program using gfortran > f90 code


Thomas Koenig

unread,
Mar 5, 2023, 5:51:15 AM3/5/23
to
David Bourne <bourn...@gmail.com> schrieb:
> On Monday, February 20, 2023 at 9:58:32 AM UTC-7, Gary Scott wrote:
>> On 2/20/2023 9:37 AM, db wrote:
>> > On 18.02.2023 12.03, Thomas Koenig wrote: .
>
> ChatGPT will write the fortran.code for you too if you ask nicely :-)

They want a phone number to register, for no discernible
legitimate reason.

This is a violation of the GDPR, so they could be in hot water
with EU law over this.
0 new messages