3 ms·
The Fortran spec was published in 1957. Today’s Fortran has features that were not dreamt of then, such as array operations with automatic parallel execution. T
by leephillips 6y ago
The Fortran spec was published in 1957. Today’s Fortran has features that were not dreamt of then, such as array operations with automatic parallel execution. The changes are a bit more drastic than improving Unicode support. But I can take a Fortran program written in 1960 to run on a computer that needed its own building, that was fed into a machine without an operating system using punched cards, and compile and run it on my phone.
- beagle3 6y agoI don't remember the details, it's been nearly 30 years, but ... I had to fix Fortran-II (1960 or so) programs so that the fortran-77 compiler (on the same IBM VM/CMS 390 system) would agree to compile them. The changes weren't big, but they were needed. (I didn't write the original - I was just the maintainer at the time) I also needed to change a lot of things porting the same program a few years later to an IRIX based machine whose name I don't remember right now (Octane, perhaps?). And that was a well behaved program that did not try to change the value of 4. Python 0.9.1 programs (Earliest I used) required much fewer changes to run on 2.7 -- partly because I never used stuff like field access control (which was luckily dropped from the language). Python 3 requires a few more changes, but I suspect I can still compile Python 0.9.1 on modern hardware and run the original code.
- leephillips 6y agoThis is a common experience, but it arises because there were many slightly different versions of Fortran in actual use, taking advantage of the features of the many different compilers. But a program that stuck to the official standard generally never needed to be changed. (But I might be exaggerating about 1960. I don’t know when the standard settled down and the commitment to non-breaking changes was adopted. But it was a long time ago.)
- true_religion 6y ago> Python 0.9.1 programs (Earliest I used) This inspired me to download Python 0.9.1. to find out what field access control was. I did find it. https://www.python.org/download/releases/early/ https://www.python.org/download/releases/early/ And amazingly it compiles, and does so in just 1.5 seconds on an iMac (unlike my Typescript project which is compiling at 90 seconds and counting.... hmmm). Unfortunately, even now with access to the source code I can't find anything about field access control. What was it? How did you use it?
- beagle3 6y agoPython had keywords that were supposed to make methods and fields private or read only or something like that. I remember they were gone by 1.4; I never liked or used them. I am on phone now, and all google results now are referring to name mangling and underscores. When I am on desktop, I’ll dig up the version and syntax.
- beagle3 6y agoOk, I've just downloaded the 0.9.1 sources, and it's not there yet, and in 1.4 it's not there anymore, must have been somewhere in between, maybe 0.9.4 or so; I'm not sure if they were ever properly implemented, but there was a point in time in which the grammar had some provision for declaring methods private and/or fields read-only or something like that. I do remember I disliked the idea and never used it, and likely it wasn't popular because it's gone. I can't find any version other than 0.9.1 to download, and trying to do newgroup archeology through Google Groups is incredibly frustrating. I've given up after about an hour of trying to find old mentions.
- PhantomGremlin 6y agoWhat about all the deprecated and deleted features? I haven't used Fortran in over 40 years. But, at the time, the following features were in very common use: Arithmetic IF-statement Non-integer DO parameters H edit descriptors Computed GO TO statement And probably a bunch more from the list: https://en.wikipedia.org/wiki/Fortran#Obsolescence_and_deletions https://en.wikipedia.org/wiki/Fortran#Obsolescence_and_delet... These features are easily changed in the source code. So does the compiler still support them? Or is there the equivalent of the python 2to3 program?
- leephillips 6y agoI don’t use Fortran regularly, or much at all, any more, so I’ll defer to someone who knows. But I think that after some point, the standards committee made a commitment to backwards compatibility, and these deprecated features actually still work, although people would be unlikely to use them in new code, because they are now considered bad practice.
- TheRealKing 6y agoVirtually all compilers still support them, even the most modern compilers that support Fortran 2018 (Intel, GNU, IBM, NAG, ...). The source file extensions readily tell the compiler what sort of code the compiler is dealing with. In the worst case scenarios that I have seen, the compiler issues a warning when encountering obsolescent language features.