• Re: =?UTF-8?Q?Re=3a_=e2=80=9cDid_nobody_stop_to_think_what_might_happen

    From Scott Dorsey@21:1/5 to Michael F. Stemper on Mon Sep 2 14:42:21 2024
    Michael F. Stemper <[email protected]> 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

    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)