Fortran 2000 Committee Draft
The formal position is that a CD (Committee Draft) Registration and Approval Ballot is in progress. The deadline for comments (from national bodies) is 27 December. Each national body will have its own deadline ahead of 27 December, so be sure to submit your personal comments to your national body well before then. For the USA, they should be sent to Deborah Donovan, email: ddonovan@itic.org. For the UK, they should be sent to David Muxworthy, email: d.muxworthy@ed.ac.uk.
John Reid, ISO/IEC JTC1/SC22/WG5 Convener
.................................................. ......................
ISO/IEC JTC1/SC22/WG5 N1494
Committee Draft revision of ISO/IEC 1539-1:1997 - Programming Language Fortran - Part 1: Base language
Abstract
Fortran is a computer language for scientific and technical programming that is tailored for efficient run-time execution on a wide variety of processors. It was first standardized in 1966 and the standard has since been revised three times (1978, 1991, 1997). The revision of 1991 was major and those of 1978 and 1997 were relatively minor. This proposed fourth revision is major and has been made following a meeting of ISO/IEC JTC1/SC22/WG5 in 1997 that considered all the requirements of users, as expressed through their national bodies.
The significant enhancements in the 1991 revision were dynamic storage, structures, derived types, pointers, type parameterization, modules, and array language. The main thrust of the 1997 revision was in connection with alignment with HPF (High Performance Fortran).
The major enhancements for this revision are
(1) Derived type enhancements: parameterized derived types, improved control of accessibility, improved structure constructors, and finalizers.
(2) Object oriented programming support: type extension and inheritance, polymorphism, dynamic type allocation, and type-bound procedures.
(3) Data manipulation enhancements: allocatable components, deferred type parameters, VOLATILE attribute, explicit type specification in array constructors, pointer enhancements, extended initialization expressions, and enhanced intrinsic procedures.
(4) Input/output enhancements: asynchronous transfer, stream access, user specified transfer operations for derived types, user specified control of rounding during format conversions, named constants for preconnected units, the flush statement, regularization of keywords, and access to error messages.
(5) Procedure pointers.
(6) Support for IEC 60559 (IEEE 754) exceptions.
(7) Interoperability with the C programming language.
(8) Support for international usage: access to ISO 10646 4-byte characters and choice of decimal or comma in numeric formatted input/output.
(9) Enhanced integration with the host operating system: access to command line arguments, environment variables, and processor error messages.
In addition, there are numerous minor enhancements.
Except in extremely minor ways, this revision is upwards compatible with the current standard, that is, a program that conforms to the present standard will conform to the revised standard.
The enhancements are in response to demands from users and will keep Fortran appropriate for the needs of present-day programmers without losing the vast investment in existing programs.
available in ps, pdf, text, or source (latex).
Now who says Fortran is not a sexy language ?? hum ?
When will I end this grieving ? When will my future begin ?
Is that like "Latin 2000" or "Greek XP"?
Am I the only one that read through half the main story, mis-reading every occurrence of Fortran as Fortean? I just surfed here from http://www.forteantimes.com, so imagine my surprise at what I thought was a major co-incidence.
Just curious I guess.
healyourchurchwebsite.com - WWJB?
Do these folks realize that it is 2002 already? :-)
Don't they have anybody in their marketing department? Any product labeled 2000 is going to look old. It should definitely be Fortran Millenium, or fortran 3000. Something catchy like that.
-S
We Apprentice Developers and Designers
"I don't know what programming language we're going to be using in 2000, but it's going to be called Fortran."
Ok, so we're not all using Fortran any more, but it isn't completely dead -- or rather, the language which is *now* called "Fortran" isn't completely dead, even though it has little in common with the original "Fortran" beyond the name.
Tarsnap: Online backups for the truly paranoid
I had to learn F77 for a class my freshman year (1997, not THAT long ago) and we were working with F77. A part of that appeared to be because there were free compilers. Since most Fortran code is done in research groups that aren't computer groups, they may not all think to buy a real compiler.
A Free F2000 compiler - that researchers here about - would go a long way towards getting Fortran coders into Fortran 2000.
My understanding is that F95 and now F00 (or whatever) are "modern" langugages.
Amazing what you can do WITH backwards compatibility if you put energy into it.
Alex
Will they support .NET? :wq
Fortran 2000 Committee Daft
Oh, its "Fortran 2000 Committee Draft".
Nevermind.
Isn't Fortran completely irrelevant in the 21st century anyways?
Absolutely not!!! NASA uses it to slam probes into Mars.
This hasn't been necessary since free format became
part of the language in the Fortran 90 standard.
Even before that, the "c" went in column 1...
Fortran is still the best language to do numerical
analysis. Little things like multidimensional arrays
and complex numbers go a long way..
I'll start by admitting that I have little experience with fortran and with the applications thereof.
::shudder:: doesn't support recursion, lexical scoping, etc., to my knowledge)
That being said, what experience I do have is that fortran is excessively difficult to write and lacking in some of the basic features I'd expect a programming language (I'm not familiar with fortran 95, but fortran 77
I can understand teaching fortran 77 to allow people do program for old interfaces and deal with the old code that would be expensive to rewrite, but why would you revise fortran to make it more usable? Why not just use C?
Perhaps I'm missing something, but I think fortran should not be taught in college (it is required for some majors here) except in the context of the historical significance of fortran.
I mean when the final specification is released in what, 2004, everyone is going to say "Hey look, Fortran is a really up-to date language?"
Would Ford show the prototype of the 2000 Focus in 2002 and then actually sell the 2000 Focus starting in 2005?
For those of us under 50, here's some history of the granddaddy of all high-level programming languages.
IIRC, my former graduate advisor and professor was on the team that wrote a very early Fortran compilers at MIT in the late 50s, written entirely on punch cards. We've come a long way in ~50 years.
:wq
Damn! It takes a long time to compile Fortran... It's been two years already... And this is just a Draft!
This
This reminds me of a couple years ago when our AS/400 RPG programming group went to a users group meeting and found out about a "new" command which will finally allows them to manipulate dates as dates in RPG, not numbers!
The really shocking part was the function had been part of their language for over 5 years. Imagine if my Java skills were 5 years out of date. I would be making flaming applets on webpages thinking that was advanced.
In Fortran's favor, I do hear many people still use it today and it has plenty of good uses. I would like to know whether it really does, or whether the people who say that have their head in the sand. I am young enough to have missed most things Fortran, starting my programming with exposure with QBASIC then Pascal as my learning labguages.
-Pete
Soccer Goal Plans
>Fortran, Cobol, and Pascal are dead languages!!!
You're not a Math major, you don't work in an Oil and Gas Exploration company, so you don't have much need of the first two. When was Pascal ever "alive?" It was never meant to be used for anything besides education.
So, someone's finally noticed that using a souped-up version of BASIC for writing mission-critical numerical code is a bad idea. :)
:-)).
:)
However, it's likely that most programmers who needed features such as inheritence, polymorphism, function pointers and so on have already bitten the bullet and moved to a C++ environment; trading off some gripes about the "standard implicit type conversions" (spit) for the increase in modularity, interoperability, etc. Introducing such features into the Fortran language now isn't going to re-write thirty years of pre-F2000 code. It feels like we're going to end up with "VB for scientists"at this rate!
But the real reason that so many people still stubbornly use Fortran is *performance*. Because the language is so much simpler (i.e. less expressive) than C or Java, it's hell of a lot easier to perform optimisations on it. Good Fortran compilers can re-arrange loop nests and do all sorts of clever stuff to improve parallelism, locality, and other aspects of performance. Add expressiveness (in the form of pointers, for example) and you add many extra complications which can render the optimisations invalid. If you can't optimise it as aggressively as you used to, you've just lost the penultimate excuse that anyone is still writing in Fortran. (The last excuse is that the 500,000 line codebase they're working on is also written in Fortran
Now I'm sure that lots of professional users and compiler writers have been involved in drafting the new standard, and that these concerns have been addressed. But I still reckon that Fortran needs euthanasia, not resurrection!
There, my 2p is now your 2p
These sigs are more interesting tha
Whats a `dead language` then? We`re not talking about rap albums or september 11th t shirts here - its a functional tool for creating software. Or is the concept of writing software out of date now?
It took them two extra years to make it Y2K compliant! And civilization on earth didn't fail.
Pointers and recursion!
has ever improved on the combination of FORTRAN and LISP. If you know those two languages, you can write better--MUCH BETTER--software faster--MUCH FASTER--than any C++/XML/Java/buzzword tosser can.
Those who don't learn from the past are condemed to repeat it. So learn to appreciate it, or your next job is going to be coding in Fortran 2000.
10 if (you
Kudos to Cartman
Post some good stories so I don't need to be AC!
I think it is you who needs to get his head out of his a...:
;-)
1. Fortran will not die until someone rewrites all those scientific computation code into C. And this will not happen anytime in the immediate future. On top of it (the last time I tried) the fortran source generated by some popular symbolic computation packages (like Mapple) was usable (after hacking) and the C was not. C++ - not even f... close.
2. Cobol - no comment.
3. Pascal. I have been watching C++ programmers take a month what used to take me a day or so with TP for Windows or early Delphy. I know - neither of them is suitable for big projects but they will still blow away C++ for RAD even now. And I do not care anymore typing away in perl anyway
So get a grip on reality and learn a bit about these "supposedly dead" programming languages before opening your a...e (err... mouth).
Baker's Law: Misery no longer loves company. Nowadays it insists on it
http://www.sigsegv.cx/
I hope this gets modded up as funny (because it is). However, I feel compelled to point out two things:
So Fortran may have taken us to the Moon, but it takes an expert system to slam probes into Mars.
Oh man. It's only in draft and it's already two years behind!
That's right. Didn't labels start in column 2?
And actually, maybe that was Fortran IV, and 77 got rid of the rediculousness of that, around the same time that Basic complilers started showing up in which you no longer need line numbers.
Remember writing Basic programs line by line, and you'd realize you needed to insert some code. So you would issue the command:
renumber 100
It was silly, but at the time, I thought it was a major advancement over good ol Fortran.
Can this text get added to the lameness filter?
It's getting old...
How many /.-ers have ever written anything in Fortran? Sounds like a poll topic to me.....
I just want to mention that the SPA algorithm that Genome@home uses to make genes is written in Fortran.
>Fortran, Cobol, and Pascal are dead languages!!!
i know, i wont believe it until netcraft confirms it.
Damn straight, why just yesterday I coded a new FEA application entirely in Python! And those accounting types downstairs slammed out some spaghetti code in Perl... They're the only ones who can understand it. Oh, and now that Java has replaced Pascal as the introductory language of choice in CS departments everywhere, we've gotten a lot fewer competent Computer Scientists and gotten a lot more average Computer Programmers. Pity, that. Code monkeys are much less valuable.
You compare Fortran 2000 to supposedly "dead" spoken languages with Microsoft version numbers after them.
Fortran is not dead. It is still used for numerical computation because its default pointer aliasing rules allow. C only picked up similar aliasing rules in C99, which no common compiler fully supports yet.
Latin is not dead. It simply became Italian, with forks turning into Romanian, Spanish, and French, and then Portuguese, Sardinian, and several other languages forking in turn from those.
Greek is not dead. What the heck do you think they speak in Greece?
Will I retire or break 10K?
I think that Fortran's move towards OO,
will not be of interest to most fortran coders
(who use fortran for the libraries, or who
cannot be bothered to learn another language).
It is interesting that C is not moving
in this direction, and instead the recent C99
revision addressed many the complaints of Fortran
coders (by introducing complex.h etc).
-j
It is still used for numerical computation because its default pointer aliasing rules allow
erm... you forgot to say what they allow. Fortran's default pointer aliasing rules prohibit two arrays passed to one subroutine from aliasing to one another. This allows for code optimization using a processor's vector units.
No, you fool! You've fallen into the same trap: C is not a "modern" language! Do they teach C in college anymore? Nope (not as an intro language, and almost never as a core requirement, anyway). They teach Java! Throw out all those useless C applications and rejoice at your modernity! What's that? No OS, you say? Pish!
FortranXP.. part of the Fortran.NET initiative.
Fortran for .NET is real.
That was just the first result from this Google search.
Will I retire or break 10K?
yerricde answered that one above
When was Pascal ever "alive?"
Ask Borland.
Will I retire or break 10K?
I thought the 'C' went in column 6. It makes the draft standards really hard to read, especially if you get the punchcard format.
OOF!
sPh
FORTRAN_TO_C.F
Damn - now it has to be updated.
--- What?
"Zero" non numerum est!
Ahh - My eye!
The doctor said I'm not supposed to get Slashdot in it!
Because C is also a very parallelizable language with hooks for both MPI and openMP and even PVM if you really want. Because automatic parallelization sucks, even in fortran. Because I can either find numerical libraries in C or I can link with the fortran ones. Because at the end of the day, I can read C easier than I can fortran and with correct use of the compiler, I can get it as (nearly as?) fast as fortran. The only reason fortran is still around in science is legacy code (which is fine by me, I don't want to port it) but new code should be written in what the programmer is more comfortable with debugging. And I disagree strongly that writing even numerical code is easier in fortran ... for me.
And FORTRAN is a niche language. FORTRAN is only really useful for number crunching. If you learn C you can do it all.
You say
As someone who writes Fortran 95 that has to be portable between two Intel Linux boxes (one w/NAG fortran on with Intels), and an OSF1 with Digital FORTRAN, standardised exception/signal handling [not just IEEE_FPE] would make my life soooo easy right now (the DEC one is great [ie Just Like C], the rest are ugly/nonexistent [or, at least, I can't find'em]).
Actually, can I turn this into an AskSlashdot - Are there any really portable methods for doing exception handling in F95?
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
I think in general it helps to teach more than one language. The current trend is to have a "core language" that schools teach in excruciating detail so that students will be able to go out and get a job right away, because they have a "skill".
But much of the time, they don't understand how or why what they've been taught actually works, which makes learning other programming languages vastly more difficult, since they're focusing on what's different in the syntax rather than on what's the same in the semantics.
Fortran has some notable advantages over C. Perhaps the most latent advantage is in the realm of multi-processing. For example there are several statments that give the compiler big hints that the loop can be spread out. For example there is loop command that is like a FOR loop but specifically says the order of the loop evaluation does not matter. Other looping commands tell the computer to apply a function over an entire array at all positions specified in a map. Function declarations tell the compiler if a variable/array in the arg list will be altered by the function call. There are delberate limits on pointer type variables that forbid pointer arithmatic and allow compiler efficiencies. As a result fortran is a marvelous multi-processing language because the compiler knows how to allocate instructions safely and how to allocate memory optimally.
Some drink at the fountain of knowledge. Others just gargle.
Fortran isn't entirely dead. At least to the scientific community. I am a Fortran programmer, working at in a research position and I'm not 50 years old, I'm not even 20. (Yeah for co-op)
.Net. Try it some time, its a rather amusing little language.
Truthfully, anything that Fortran can do, C can do better. But that wasn't always the case. Fortran used to be A1 for number crunching, and thus is used and still used by many research companies. Sometimes, if you don't have a CS degree its just easier to use the language you learned when you were in University or College than spend the time learning C or Java.
Some older satellites (8-15yrs) used Fortran code. And if those satellites are still in the sky, (which they are) then those persons working on keeping and updating them need to use good 'ol Fortran to keep them up in the sky.
Each 'new' version of Fortran tries to get a little bit more object-oriented than the last. At the moment I use both 77 and 90 (neither are object oriented). Fortran also has the lovely feature of GO TO!
Fortran will probably be used for awhile longer. Even with
</sarcasm>
T
---- It puts the lotion on its skin or else it gets the hose again. It does this whenever it's told.
I started coding in FORTRAN IV in 1975. I have used Basic, COBOL, 3 or 4 assembly languages, Pascal, C, C++, Java, and various and sundry other toys. I started as a scientist and then quickly became a programmer/sysadmin. I used FORTRAN for scientific applications programs for 14 years. I then switched to C and now C++. I like both of these much more than FORTRAN. However, where I work we have one of the top 20 fastest supercomputers in the world and we do oceanographic and meteorological modelling. These are ALL done in FORTRAN for two reasons: First, it's the fastest language to use on almost all supercomputers. Second, most scientific modelling programs are (and were) written in FORTRAN. As long as these guys keep it the best/fastest language for parallel processing it will continue to exist. This is neither good or bad, it just is.
You do realize this word means "next-to-last", right?
So, what's the ultimate fortran program?
- A.P.
"Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
Sorry, couldn't resist.
I have written an informal description of the new features
Which this margin is unfortunately too small to contain.
Fascism starts when the efficiency of the government becomes more important than the rights of the people.
why won't this lame language just go die. Die Fortran...just go lay down and die. I work as a computational chemist and it is painful to me to watch me superiors write fortran code...I just can't understand why they won't take the time to at least learn C...although for the size of our projects C++ is the obvious lnaguage of choice.
I hate Fortran and wish that it would just go lay down and die.
what?
You're unfortunately right about Flight sims. I just received a .for file and the guy expected me to know what to do with. Now, I'll go back to my C code :)
Back in my grad school days (5 yrs ago) everyone who had supercomputer time was writing in FORTRAN. Just ask yourself, do you want to write a new optimized routine to compute the Cholesky decomposition of a positive definite matrix for a sparse matrix and store the resulting sparse matrix in band compressed form so that you can increase your grid size from 5k to 20k elements -OR- do you grab the linpack routines from http://www.netlib.org/linpack and go have a beer.
At the University of Minnesota beer usually won.
Truth: If it's not one thing, it's another
Unlike Cobol or pascal or anyother "Old" language FORTRAN has some advantages. Properly written fortran code will be faster than c. However, it cant do every thing that c can. FORTRAN 95 is even faster for multiprossesor machines. So it is a higher level, higher perfromance, less featured language. Plus, most Geniuses only know FORTRAN. So, I think the Object Oriented stuff in FORTRAN 2000 will be lost on them. They don't want it and they wont use it.
You may laugh, but there are still new scientific applications being written in Fortran.
F77 was a cool language. IIRC, the original version of Adventure Cave used an interpreter that was written in F77. It is also one of the few languages that have native support for imaginary numbers (some versions of APL did as well).
Looking at the summary of changes, I suspect that they've finally messed up the things that made FORTRAN (or at least F77) great. The addition of pointers stands an excellent chance of rendering code un-optimizable, and I fear that adding OO features is an even bigger mistake. I would have liked to have seen Unicode support and exception handling, and that's about it.
Nothing for 6-digit uids?
I really can't remember, been a while...
I never used F77 anyway, all my compilers were more advanced, though they all predated F95, they had many additional and fairly standard 'non-standard' features such as you'd expect from any good procedural language.
Any the I/O was superb for files and command line... (compare with the c**p that C++ has...)
Sorry for the offtopic post, but this is important.
See this story from yesterday for more details. Pets Warehouse has recovered from the Slashdot Effect and is back up. Click the link, click the link, click the link! Don't let Robert Novak, Slashdot enemy-of-the-month, earn one more dollar from his website!!!
Also, e-mail them and tell them what you think! Call them at 1-800-991-3299 from a payphone: they'll have to pay for the 1-800 call *and* for the payphone usage!
Show them the POWER of Slashdot!!!!!!!!!!!
twitch.
I can't use Frotran, my PC doesn't have a punch card reader. And they will never elect an actor to the Whitehouse. Hope they get the hostages home from Iran soon.
twitch twitch
Of course, don't tell that to the latest bunch of basement denizens who, just because they don't UNDERSTAND FORTRAN, they think it's automatically obsolete. In '97, Tech started teaching C++ instead of FORTRAN, and guess what, the class of 2001 engineering student all sneer at FORTRAN, but lo and behold, when they get out into the real world, they can't get jobs as easily as the class of 2000. Why, you ask? Because FORTRAN is still used for a sh!tload of applications!
I now work for the school, and i'll give you a perfect example why FORTRAN is still used. At my job, we have to sort every students' name and ID in this huge file. We use FORTRAN to do it, but we thought it would be interesting to see what other languages could do in terms of efficiency. We wrote a C++ shell sort (reasonably efficient) routine to sort the 30k names. It took several seconds...not bad. Our old FORTRAN code is a bubble sort routine (least efficient) and it does the same job in less than ONE SECOND. That is why FORTRAN is still used and screw all you idiots who think FORTRAN is dead!
Forgive me, I'm just sick and tired of other people's stupidity.
Thank you very much for this introductory line in your comment. After quickly reading this, I knew I could immediately skip the rest of your post.
If only the whole slashdot community would follow SlugLord's lead, and let us all know when they've just posted a useless comment. Bravo!
I work in the flight sim business. I can assure you that every one of the 2 million plus lines of code written by my team over the last ten years was in C++ and for the ten years before that it was in C or Ada.
30 year old code will probably be in FORTRAN.
We do still have legacy code in Fortran. Mostly stuff we inherited from other simulators - and mostly in the area of simulating the actual flight dynamics. That stuff is hard to rewrite accurately and is a *tiny* fraction of a typical multi-million-lines-of-code simulator.
HOWEVER (dragging this screaming and kicking back on-topic) there is absolutely no need to invent FORTRAN 2000 just so we can run legacy code. If it's legacy code, that's because we can't/won't rewrite it - so why would we need a new revision of the language?
All that the world needs is a good way to call FORTRAN functions from within C++ - and we already have that.
FORTRAN should just be left to die peacefully.
www.sjbaker.org
But what about the BIG question?
When and why did the name change from "FORTRAN" (all uppercase, preferably with a slash across the letter O) to "Fortran" (mixed-case)?
Indeed, since the name means Formula Translation, if the name was to be changed at all, why was it not changed to ForTran (with an internal upper-case T?)
Those familiar with the world of M, I mean MUMPS, I mean M[UMPS], where the name of the language either was or was not officially changed, and the language is or is not properly referred to by both names or by one or by the other, and where M is either an officially sanctioned abbreviation, an officially sanctioned alternate name, or the One True name, or was changed in the ANSI spec but not the ISO spec... or not... will appreciate the importance of such issues.
Particularly since in these modern days it's pretty safe to assume that your PC's printer is equipped with a full 192-character chain.
"How to Do Nothing," kids activities, back in print!
Plankalkul, designed by Konrad Zuse in 1945 has got some strong claims as the first (though it didn't influence later languages as it didn't become known to the wider computing world until the 1970's).
Any sufficiently advanced technology is indistinguishable from a rigged demo
--Andy Finkel (J. Klass?)
I think I recognize some of these names on the Fortran 2000 committee, they were on another committee that was coming up with designs to retrofit Model-T's with solar cells
<grub> Reading
Why am I not surprised to hear about object-oriented features being slapped onto the side of Fortran for no other reason, apparently, than to be cool? I'm with our buddy Tablizer on this one: objects are nice in some applications but there are places where they're better left out. Coincidentally, many of those places are where languages like Fortran are still used.
N4st0r, trixx0r h0bb1tz0rz! Th3y st0l3 0ur pr3c10uzz!
Migawd! They even let you populate an array without reading the numbers from punchcards! And pointers?! Back in my day a pointer was a dog used to hunt birds.
Actually, there are already studies if one can train apes as programmers. After all, it's well known that apes can type Shakespeare dramas if you just have enough of them and give them enough time, so why shouldn't they be able to produce software?
The Tao of math: The numbers you can count are not the real numbers.
What you are saying could not be more true.
The thing is, Fortran is fighting a language war on two fronts.
On the one hand, it's struggling against newer languages like C/C++--and yes, sometimes even Java--that younger programmers are more familiar with and that have been more flexible for some years. Often, there's at least some question as to whether or not code written in one of those languages is similar enough in speed to that written in Fortran, and often, the answer, after some debate, is that it's 95% the speed or something like that, and the ease of coding far outweighs the speed lost.
On the other hand, Fortran is struggling against very-high level languages like MATLAB/Octave, S/R, Ox, and to a certain extent, Perl, Python, and Ruby. These languages aren't exactly competitors in speed, but their ease of use is unparalleled. Everyday computational tasks that used to be done in Fortran (or C) are now routinely done in MATLAB or R because it's just so damn easy to do.
Modern Fortran is beautiful as a numerical programming language. It is oriented toward numerical analysis far more than C/C++, so much so that it's almost comparable to something like MATLAB.
The sad thing is, though, that not many people seem to be switching to it. True, there are those that use it, but it's often for reasons of tradition or because speed, pure and simple, is an absolute priority. It's a small group. It doesn't seem to be attracting those who currently use MATLAB, but who might use something more low-level because MATLAB isn't flexible enough, or those who use C/C++/Java/Ocaml/whatever because that other language is flexible/easy to code/portable/whatever but might switch because those languages are a bitch relatively speaking when it comes to numerical analysis.
I'd argue that the reason why more people aren't switching is precisely because it's not more available. When someone is trying to decide between C/C++, MATLAB, or Fortran, Fortran is going to lose:
C/C++ is often similar in speed to Fortran, has compilers freely available, and is generally more extensible than Fortran.
MATLAB is slower, and costs lots, but there are open-source alternatives, and it's damn easy to write code for.
Modern Fortran is fastest, but often only slightly faster than C/C++; it's easier to code numerical routines than C++, but not necessarily always due to libraries, and less easy to code in than MATLAB; finally, it's unavailable unless I pay money on the order of MATLAB.
So you can see, most people buy MATLAB, and code really low-level stuff in C/C++/whatever.
If Fortran is going to survive, it needs to do more than have modern features--it needs to be competitive on an avaiability front as well. Otherwise it's going to die off a slow death.
"After all, it's well known that apes can type Shakespeare dramas if you just have enough of them and give them enough time"
Naah - check out the internet. That just ain't true!
Luckily I know how to keep my mouth closed* because I was eating yogurt when I read it and started to laugh. I can already imagine the smiles at work ("what happened to your laptop this weekend?") had it been open.
*although some people would say I need to learn to keep it shut.
"The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers." Bill Gates,
says...
"Never use a programming language that is older than you are".
So I'm just about okay with Fortran 66....
Baz
It looks to me like the f90 syntax of accessing arrays is identical to what is used in MATLAB.
So it looks like at the very least fortran will live on as long as Cleve Moller and crew still make a living writing software....
...with the sort of morbid fascination that makes people slow down to look at car wrecks:
Does the language still have EQUIVALENCE?
which assumes that your processor has vector units, and that your compiler is smart enough to know about them.
PowerPC G4 has "AltiVec" brand vector units. AMD processors from K6-2 on up have "3DNow!" brand vector units. Sony PS2 Linux boxen have "Emotion Engine" brand vector units. Intel processors from Pentium 1.5 on up have "MMX" brand vector units.
Does GCC perform vectorization?
Will I retire or break 10K?
maybe I'm just really opinionated, but adding
object orientation to fortran 30 YEARS after it
was designed just isn't going to work.
Look at OO in perl compared to python, java, or C++
for an example of objects scotch taped onto a working
language as an afterthought. It looks like a cat
ran across the keyboard with all the crazy => $ #
and other syntax that makes it hard to read.
Also, this "old solid codebase" won't be used
with the new object features -- that would just
be a bad idea after another.
When I worked at NASA Ames in their supercomputing
center in the mid 90s, I was always amazed at how
those huge computers were just being used to work
matix solutions in fortran all the time. That's
really about all crays are used for, which is a
shame.
but, like I said, that's just my opinion of fortran
if this works, lets get them to develop ALGOL 2002
or maybe RATFOR 2006?
...and has done so for quite some time. None of the languages bundled with GCC first translate into C.
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
and is hosted right over at g95.sourceforge.net. Take a look.
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
One of the biggest additions to Fortran that I haven't seen mentioned so far is support for Perl 6 style regular expressions.
[ducks for cover]
1. Momentum...
2. Engineers (aero, mech, whatever) have to be conserned with all kinds of things besides writing code, but they are also the ones who understand the problems enough to write the analysis codes, so they need a fast, SIMPLE language. Most of them don't have the time, or their brain power is devoted to other problems, to learn half a dozen languages to do every little thing in just the right code.
I am an engineer who minored in CS, and I work in computational fluid dynamics at a large jet engine company, I learned C++, and scheme in college, I love C++, I did not learn fortran until my senior year when I was interning at my current full time place of employment. I hated it at first, but it has really grown on me. It is also great for all the guys I work with who do not have the same CS experience I have...
"I'll have a Guinness, no wait, make that a Coors Light" -Grad student I work with, who shall remain anonymous...
Any plans for a FORTRAN on MicroSoft NET? Look how much mileage Bill G has gotton introducing various versions of BASIC the past 27 years. I recall when MicroSoft was primarily a languages company, 1975-1981, it shipped a version of PC-FORTRAN.
Most of the people I work with have not even teken the time to learn the new features in fortran 90, I have been trying to get them to adopt them for their own (and my) benifit. It would be hell to get these folks to learn C.
"I'll have a Guinness, no wait, make that a Coors Light" -Grad student I work with, who shall remain anonymous...
I am an engineer in the computational fluid dynamics (CFD) department at a large aerospace company. Also, just to show it is not all old folks that use fortran, I am under 25...
"I'll have a Guinness, no wait, make that a Coors Light" -Grad student I work with, who shall remain anonymous...
What's wrong with Java then, once you have a native optimizing compiler? It has very limited aliasing (one array can not point in the middle of another array) and garbage collection will not take much time for typical FORTRAN-style programs (a bunch of arrays without embedded pointers).
As for teaching, it's a waste of time to use any of the structured languages in the first class. First show a student how to use computer as a calculator with the BASIC "?" statement. Then show how INPUT can be used in a several-line program that solves a quadratic equation. Then add a goto to the beginning so that you can solve a bunch of equations without re-running the program. Don't teach loops, subroutines, classes etc until they are actually capable of writting a program where it makes a difference. As it stands now, we are trying to explain dance movements to students who don't know yet how to walk.
Let's take this program:
5 input a
10 ? sqr(a)
15 goto 5
How exactly can it be made clearer by using any of the structered, OO etc programming techniques?
... is what FORTRAN is good for: number crunching. F77 is a perfect tool for many scientists who don't care about pointers or object oriented programming or nice graphical output subroutines or any other nice things that other programming languages have. They want something that will do some number crunching for them and won't screw up or cause problems.
FORTRAN is simple. It works like many mathematicians and scientists think it should. It meshes well with what they really want to do in a good number of cases. The level of abstraction is perfect for many of them.
FORTRAN will take a long time to die because of this. Personally, I like more real-time interpretive languages like IDL. But when it comes down to something that is pure number crunching that'll take a few hours, I'll gladly have FORTRAN. That's why so much in the sciences is written in FORTRAN, then the data is output and run through other programs to do the pretty plotting and further interpretation.
FORTRAN just works, has worked for 30+ years, and with the amount of incredibly useful code still around, will still work for decades to come. Granted, I don't necessarily like some of the proposed changes, but as long as everything works like it did before with F77 code, I think no one will (or should) mind.
-Jellisky
...F77 is what you rely upon.
To calculate aircraft performance (i.e. can we take off with x passengers on this airfield that happens to have a big mountain at the end of the runway?) all (no exceptions) airlines use F77 calculation modules that are provided by the aircraft manufacturers.
These calculations are, at least in my book, as close to mission critical as you can come. Do it slightly wrong and you may end up in the safety net at the end of the runway. Do it majorly wrong and you hit the aforementioned mountain...
The modules are reasonably complex (up to 100k loc without a GUI), in strict F77 with the mess that that brings along and are written by Aerospace majors who, if they were lucky, got a 3 week course in F77 at University.
The obvious question is why?
- F77 is the most suitable language for the problem?
- Aerospace engineers like F77?
- It's an international conspiracy?
Unfortunately the last one is closest to the truth. The modules are coded according to a standard decided by IATA - International Air Transport Association (http://www.iata.org). A standard that was created some 20 years ago and with regards to F77 of course has not changed since... Why? Because the airlines knows how to handle these modules. The I/O and behaviour is well documented and understood and to change to something even resembling modern CS practices (even F90 would be a giant leap forwards!) would require huge investments for the airlines. Something they are of course not too willing to do. There are some reason for the currently ridiculously low (in comparison) fares we pay.
Oh, and by the way, the modules are of course not in any way certified by whatever competent authority there may exist. No, in general they prove their worth by the good old method of "service history".
PS. I have not given up flying just because I've experienced this. All aircraft operations have a rather large safety margin built in. For the "ouch" picture above with the very hard mountain top, we would also need to lose one engine. This in combination with the fact that the "service history" criteria seems to work pretty good still makes flying safer than walking...
No, what I don't understand about keeping fortran alive is because its users (scientists mostly) are people who refuse to use something new and better. They all use fortran 77 the way they learnt it through a 10 hour university course. I tried to get some of my users to use fortran 90 or 95 and failed pathetically. As my boss said: "if you think you have a clever programming trick, forget it !"
So what is the point of extending fortran with polymorphism and such ? They'll never use it. As a pro developper I'll never use it (I have the right tools already: C/C++/Java/assembler/perl depending on the job).
What is the point ? So they can sell expensive compilers with the new Fortran2000 sticker on it that nobody will ever use ? Marketting gimmick ?
Non-Linux Penguins ?
f00!
This r0x0rs, d00d!
Mordor...a magical, mythical land where women are more rare than dragons--but where every man would rather find a dragon
I work in computational fluid dynamics and we have a 640 CPU linux cluster, running intels, to do a lot of our processing. Although I am not deaply involved in this part of the work, I know that we have a group of experts making sure that we use compilers that can properly optimize our codes. On our linux machines, I think we use a protland group compiler for our fortran90.
I don't think anyone else investing that much in raw computing power would not take the necissary measures to see that it is used to it's fullest potential either...
"I'll have a Guinness, no wait, make that a Coors Light" -Grad student I work with, who shall remain anonymous...
Age is showing....
Well my pa uses it in his research doing heavymath (He is professor in economics). I can remember that he ran programs that lasted a few weeks! (5 years ago) On some fat IBM machine. But now a days he dose the same on his desktop during a night.
So all i know of FORTRAN is that its good for heavy math.
All that the world needs is a good way to call FORTRAN functions from within C++ - and we already have that.
Ermmm, I don't know how to create a Fortran pointer in C++, let alone pass it to a Fortran procedure. Fortran pointers drag around bounds and stride information for arrays, but then this isn't important for a language that doesn't actually have arrays.
Speaking of which, how do I pass an assumed-shape array from C++ to Fortran. OOPS, I almost forgot that C++ doesn't really have arrays.
Gee, I sure would like to use that Fortran library code that has optional arguments, but I don't know how C++ could represent an absent optional argument.
The point of all this sarcasm is that there's lots of useful stuff in Fortran that you can't do in C++ or get at from C++.
Absolutely not!!! NASA uses it to slam probes into Mars.
If you BOTHER TO READ the report of the navigation failure of the Mars climate orbiter, you'll see that it had several causes unrelated to the fact that the software is written in Fortran.
1. Lockheed and Martin, now one, have done business with JPL for decades. They well know that everything is metric. Inexplicably, when the spacecraft did attitude maneuvers (which because of imbalances can change the trajectory) they reported the results of their "small forces" model in pound seconds, not Newton seconds, so they were off by a factor of 4.4.
2. A member of the navigation operations team, which was overworked, understaffed and undertrained, noticed an anomaly in the trajectory several weeks before encounter. He didn't have the expertise to understand what it was (read the part about "undertrained" above), his boss told him "you don't have time to worry about that" (read the part about "overworked understaffed" above), and because the JPL senior management has been hard at work for a decade demolishing the institutional infrastructure of experts, there was nobody he could return to.
3. When it became obvious, even to managers, that there was something wrong with the trajectory, a "tiger team" meeting was called, with engineering, propulsion, operations, software, managers, etc. After much discussion, it was decided to do a fifth trajectory correction maneuver, since by that time the uncertainty in the spacecraft position exceeded 60 kilometers. After the meeting, the managers went back to their castle and decided not to do it.
Absolutely not!!! NASA uses it to slam probes into Mars.
If you BOTHER TO READ the report of the navigation failure of the Mars climate orbiter, you'll see that it had several causes unrelated to the fact that the software is written in Fortran.
1. Lockheed and Martin, now one, have done business with JPL for decades. They well know that everything is metric. Inexplicably, when the spacecraft did attitude maneuvers (which because of imbalances can change the trajectory) they reported the results of their "small forces" model in pound seconds, not Newton seconds, so they were off by a factor of 4.4.
2. A member of the navigation operations team, which was overworked, understaffed and undertrained, noticed an anomaly in the trajectory several weeks before encounter. He didn't have the expertise to understand what it was (read the part about "undertrained" above), his boss told him "you don't have time to worry about that" (read the part about "overworked understaffed" above), and because the JPL senior management has been hard at work for a decade demolishing the institutional infrastructure of experts, there was nobody he could return to.
3. When it became obvious, even to managers, that there was something wrong with the trajectory, a "tiger team" meeting was called, with engineering, propulsion, operations, software, managers, etc. After much discussion, it was decided to do a fifth trajectory correction maneuver, since by that time the uncertainty in the spacecraft position exceeded 60 kilometers. After the meeting, the managers went back to their castle and decided not to do it.
Oh, please SEWilco, enthrall us with your tales of Fortran IV! Better yet, tell us about how you woke up one morning and found that your wife had run off with a picture of my sweaty nut sack. Deny it all you like but right now, in some poorly ventilated strip joint, your wife is showing her scarred and misshapen fun bags to large groups of overweight men in order to pay the rent on a shitty apartment where she lives alone with the photograph of my ball sack. She has had it reproduced a number of times because she enjoys rolling around with it in bed. While she services the Johns she brings home she thinks about my balls slapping against her chin, rather than the wart-infested set that she actually has to deal with. Yes, your wife left you for the life I've just described. And to add insult to injury, she's happier with her new life than she ever was with you. How does that make you feel SEWilco? Well?!! But listen, it's not your fault entirely. Very few women can resist a photograph of my testicles. For instance, your sister couldn't. The last I saw of her she was stumbling around the desert licking the decapitated head of a prarie dog because, in her drug-induced state, she believed it to be my left ball. The women who have been part of your life certainly have taken a turn for the worse, haven't they my good friend? In the end, it doesn't matter. They were ass-lickers to begin with so you're probably better off without them. I do recall the fact that you, yourself, are an asslicker BUT one ass-licker alone is a much better thing than a group of ass-lickers living together. A group of ass-lickers doesn't know that they are ass-lickers. They think they are happy, well-adjusted people living the American dream. Alone, very, very alone, you can see that you are an ass-licker and take appropriate action. For instance, you could stop licking so much ass! That might be a good start. But let's get back to your post, shall we? You are such a fucking loser. I can't even begin to describe how much I dislike you. You are dickless, in the most true sense of the word. I pity you and any children you might spawn. Your parents gave you the genetic tools to do nothing outside of sucking dick and, from time to time, pouring food into your mouth. You are stupid and ugly and I must again stress that I do not like you. Get that into your head because that's how everyone feels about you. Look at your day to day living; you know it's true. No one likes you. Take care! :D
Obviously nobody really reads the spec.
/. They've taken classes from biased CS
I help support a code that was started in 1962
and has been updated regularly ever since. It
isn't pretty, but it is probably no more difficult
to read than 40 year old C++ code (can you imagine? Shudder!).
It (both the code and the language) works on most major platforms.
It (both this code and the language) helped design your car, airplane, even your washing machine.
Even if you yourself don't know or never use
Fortran (the lower case was adopted shortly after
the F77 standard was finalized, so it's older
than most responders here), you or your compiler
probably use fortran libraries.
The new standard makes C-interoperability much
easier. So it is likely that any major scientific
work you do will continue to use Fortran libraries
for many years into the future.
OO is in there because users asked for it.
Why to use Fortran rather than C/C++/Java: if you
ever needed a fast multidimensional array, don't
bother trying to implement your own in those
languages. I know several C++ experts who tried
developing their own matrix/tensor packages and
gave up -- the compilers were too slow and it
was too hard to program.
Fortran cares about precision. Fortran cares
about arrays. It handles type conversions
automatically. Lots and lots of intrinsics are
generic over your standard data types, and
automatically handle arrays of up-to-7 dimensions.
For scientific programming, these and other
capabilities allow you to Just Do It.
You can't really argue with the CS types who hang
out on
professors who checked out of Fortran in the late
70's, before F77 was even standardized and the
compilers got fast. It is classic sophistry --
rather than look seriously at the reasons why a
methodology might be of true value to many people,
they reduce it to an absurd absolute and poke
fun at it.
Besides, how many CS people actually know how to
invert a matrix? (Hint -- you don't compute the inverse).
It's pretty cool. All the nastiness about holleriths,
no structured types or object oriented constructs
is gone. Pointers or at least C_PTR can now be useful.
and the FORTRAN C interface is now standardized.
These were all things were people had to go outside
the standard before in order to get real work done.
People will not have to do that anymore.
Let's just hope it stays as optimizable as it is currently.
It looks to me like the committee did everything right,
and that FORTRAN is coming along quite nicely.
there's no need to type that stinking semi colon at the end of every line
The airline industry (where I've spent most of my career) has a LOT of legacy code that is written in Fortran, as a programmer for a major airline, that is the code that I spent time maintaining and adding to over the years.
Some of it is in places you might expect to see such an "enginerring-oriented" language used -- for applications like flight plan generation, optimum fuel burn calculations, and such.
Other applications, however, like cargo waybill processing, are in Fortran simply because they're relatively old (late 60's/early 70's) and Fortran was considered the most applicable language at the time for the platform (Sperry UNIVAC 1100's) that they were written for.
My current position doesn't use Fortran (it's a lot worse -- we use COBOL74), but it's a paycheck.
Mainframe/UNIX Bit Twiddler and long time Windows/Linux Hobbyist.
The Theorem Theorem: If If, Then Then.
If you BOTHER TO READ the report of the navigation failure of the Mars climate orbiter...
If you'd BOTHER TO GET A SENSE OF HUMOR...
> All that the world needs is a good way to call FORTRAN
> functions from within C++ - and we already have that.
> FORTRAN should just be left to die peacefully.
I strongly believe this is the guy who is right. Maybe I would add that I would like to be able to call Fortran from any language, not just C++.
Tradition.This is the primary reason people write Fortran programs. That goes for other languages too, tradition is what mainly governs the choice of language.
Fortran is still a primary language taught to science students learning numerical analysis. Though the rational choice has been Matlab for at least a decade.
I question the claim that Fortran compilers are somehow inherently good at optimizing code.
There are new processors coming out all the time, so the compilers need to be reoptimized. The parameters for that optimization, like cache sizes and pipeline design, etc, are changing the rules for what code is efficient.
You are talking about modern FORTRAN though - the legacy FORTRAN that we have is all >30 years old. I could be wrong - but I don't think all the fancy features you refer to existed back then.
www.sjbaker.org
The oddest Fortran construct IMO is the 3-way branch (goto) statement.
It roughly has the format:
if (x, y) a, b, c
Where a, b, and c are line numbers, and x and y are two expressions to compare. If x less-than y, then goto a, if equal, then goto b, if x greater-than y, then goto c.
Goto's galore.
Table-ized A.I.
Too late for this report to be nominated for the CS section of the 2002 Ig Nobel awards.
-- What do you need?
-- Gnus. Lots of Gnus.
10 CONTINUE
I'd advise against that; he's wrong. He's probably just transferring his desire to avoid using Fortran into an unsupported belief that it will go away.
I certianly have similar desires myself (I took Fortran off my resume 10 years ago so I'd never be the poor sap stuck using it). But I don't share his delusions.
I took a graduate level course in compiler optimization, where I got to question that claim almost daily.
What I discovered from the course is that Fortran compilers are really good at optimizing, in general. There are two main reasons for this.
Reason one is some inherent qualities of the language, chiefly its lack of pointers. When your language supports pointers in the unrestricted way C++ and C do, suddenly any object can be aliased at any time. This makes it damn tough to optimize things.
However, languages that are strict with pointer usage, and stricter than Fortran on the results of other constructs, could in theory be even easier to optimize than Fortran. Ada, Java, and the various Wirth languages come to mind.
But theory really matters little. Fortran's big advantage over those other languages is in practice. Fortran users are doing hairy numerical processing, where they need all the optimization possible, and are willing to pay for it. Thus extreme efforts get put into optimizing Fortran compilers, and most of the research into optimization theory is funded by Fortran users.
>>> FORTRAN should just be left to die peacefully.
>> I strongly believe this is the guy who is right
> I'd advise against that; he's wrong. He's probably just
> transferring his desire to avoid using Fortran into an
> unsupported belief that it will go away.
I dont see much much I disagree with in what you write. Note that you misrepresent the first quote. It says "should" not "will".
And in the second quote you seem to overlook the word "inherently". Fortran is not inherently good for optimization, that's what I say.
I am aware of the extreme efforts being put into Fortran compilers. This is the reason Fortran compilers are good at optimizing, I think.
Also, the PHD students doing the work gets to be pretty good at their craft, and they can bring over some of their optimization tricks to new architectures.
Also, the experts in constructing the numerical algorithms come from the same team as the experts on optimizing the compilers. They are all monks in the same Bacchi temple. They share their traditional wisdom with each other.
So. Fortran would be an extremely optimization hostile language if its compilers were not the most efficient ones for number crunching. Because these compilers are where 99 percent of the optimization energy is put today when it comes to scientific number crunching.
But its not in the languages itself. To suck out the last performance you will be resorting to assembly language optimization, or at least using non-standard, ie non-Fortran, compiler directives inside your Fortran code.
Strong religious tradition is the governing factor here. The tradition makes these guys stick to Fortran. They are pretty much immune to any arguments, like any other gang of zealots.
The computer FX games guys don't program in Fortran. They program in C. And they need performance just as bad as the number crunching guys.