Fortran

Tomasz Rola rtomek at ceti.pl
Sun May 11 14:04:23 EDT 2014


On Mon, May 12, 2014 at 02:42:13AM +1000, Chris Angelico wrote:
> On Mon, May 12, 2014 at 2:09 AM, Tomasz Rola <rtomek at ceti.pl> wrote:
> > Given that Fortran is here for almost 60 years and lot of effort has
> > been spent to keep it backwards compatible (AFAIK), I wouldn't hold my
> > breath. Something may look like cool and great, but wait ten years and
> > see if after major language revision you can still (more or less)
> > easily run your existing huge projects with it.
> 
> The Unix pipe system is still working beautifully, and will continue
[...]
> 
> But retaining that backward compatibility is a huge cost. Sixty years
> ago's hardware wasn't the same as we have today. You can't simply run
> the exact same compiler and get the same bytes of output and run them.
[...]
> 
> If a language basically says "That code you wrote two years ago? Not
> gonna work now", then I'd see that as a big blinking red light. But
> "Ten years ago's code will probably work on today's interpreter,
> unless it uses as identifiers what's now a keyword, or it might be
> unintentionally treading on now-fixed bugs in which case it might have
> to be fixed", that's not as big a problem. Yes, you'd need to 2to3
> that old Python 2.3 code to get it to run on Python 3.4, but chances
> are it'll run mostly-unchanged on 2.7 (modulo string exceptions,
> maybe). I'm cheating a bit by citing Python 2.7, given that it's now
> four years old, but it's also going to be supported for a good few
> more years. Not sixty, presumably, but a good while.
> 
> ChrisA

I can easily agree to your points. Personally I don't really care much
about decades-old codes (unless I want to play with them inside some
emulator). There was indeed a lot of change in OSes and hardware, and
languages should keep up with it, if possible. And the "pipe
extention" is one of the things I'd consider - as well as other
similar means, like SOAP or REST. However, obsoleting code younger
than five years does not feel good to me. AFAIK big projects take
years to be written, polished up, debugged and sometimes refactored
(during this time they may also be used and go throu their own big
version changes), so it is really big pain to see how after all this
work someone's decision changes ground under one's feet.

As of remark by Marko Rauhamaa, that "Fortran is successful with
people who don't know how to program and don't care" - I wrote maybe
two Fortran programs so far, both very simple. I tried to obey so
called rules, inserted comment lines, checked for return values and
issued warnings/errors when needed, didn't use goto excessively
(AFAIR), didn't make stupid things like changing index variable inside
loop (other than by predefined step in one and only one place, be it
by hand or by compiler). For one program I got max points to get (uni
course) and for the other I have been presented with a basket of
strawberries. Was I successful - or my use of Fortran :-)? OTOH I once
had to work with someone else's Java code, a huge class in huge file
and I found it too borked to repair so I rewrote from the scratch.

Will I write some more code in Fortran - maybe, or maybe not. I don't
feel any urgent need to do this. There is still a lot of things I'd
like to learn and a day has only so many hours.

I consider Fortran a useful tool which may possibly outlive me (but
let's wait and see :-) ). As of quality of its users, sure, I consider
programming a full time activity and it is very hard to find people
who want to be good at it *and* in their supposed domain at the same
time. Heck, I keep reading it is hard to find people who would like to
be good in anything at all.

Perhaps part of the problem is unwillingness to tackle it. I think
majority of people would like to do things better, especially if it
only requires small changes in behaviour. But they simply don't know
there is better way, because nobody cared to tell them or show by
example. Or nobody knew there were some people who would have been
happy to hear a word of advice. Well, at least it is nice to believe
in this.

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_rola at bigfoot.com             **



More information about the Python-list mailing list