Deutsch   English   Français   Italiano  
<vb550g$2vjs3$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Lynn McGuire <lynnmcguire5@gmail.com>
Newsgroups: rec.arts.sf.written
Subject: =?UTF-8?Q?Re=3A_=E2=80=9CDid_nobody_stop_to_think_what_might_happen?=
 =?UTF-8?Q?_in_an_emergency_in_space=3F=E2=80=9D?=
Date: Mon, 2 Sep 2024 14:51:42 -0500
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <vb550g$2vjs3$1@dont-email.me>
References: <vaaphl$11duc$1@dont-email.me>
 <3b91eadf-cd9d-ea46-fcdf-10a0898c3218@example.net>
 <vb350r$1pc93$1@dont-email.me> <vb4coc$2rg60$2@dont-email.me>
 <vb4isd$3f7$1@panix2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 02 Sep 2024 21:51:45 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="aa44fe10aae61086dc3d6f58157af3e7";
	logging-data="3133315"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX197Tw8hJ3aTfAYLVTjgP38SgYM3AFv9n/w="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/LYP3dbfrrPiutRzn/1Ovr0ezE4=
In-Reply-To: <vb4isd$3f7$1@panix2.panix.com>
Content-Language: en-US
Bytes: 3143

On 9/2/2024 9:42 AM, Scott Dorsey wrote:
> Michael F. Stemper <michael.stemper@gmail.com> wrote:
>> I would guess that a straight translation of Fortran to C++ could be
>> automated. However, there doesn't seem to be any point in it unless
>> you're going to make use of the object-oriented capabilities of C++.
>> Then, of course, you're looking at a complete refactoring, which would,
>> indeed, be non-trivial.
> 
> Bell Labs wrote an f2c converter back in the eighties and it worked okay.
> For years it was used as a front end to gcc in order to make the g77
> compiler, which worked most of the time for clean fortran 77 code.
> It was not wonderful and it was not optimal but it was functional.
> 
> The nice thing about fortran is that there's a lot less to go wrong than
> with C++.  Engineers should not be allowed to touch pointers.  Nobody should
> ever use null-terminated strings; that was just a bad idea initially.  You
> can still goober things up by writing past array bounds and passing
> subroutine and function parameters improperly but at least we have some
> tools to find these quickly and easily.
> 
> f90 has a lot of very cool matrix functions and operators which make
> compilation on a vector machine (like a GPU) easier, and make for much
> more readable matrix code too.  I have trouble convincing people to use these
> however.
> --scott

I have converted F2C into my own F2CPP with quite a few changes for code 
readability and semi automated usage of std::string.  The fortran reads 
and writes are a complete disaster so I am rewriting these by hand.  I 
have converted almost 100K lines of F77 to C++ so far, all working. 
750K lines to go.

I would never rewrite our matrix code algorithms which were originally 
written in F66.  There is too much error trapping and the wisdom /hard 
experience of many, many, many fixes in it.

Lynn