Yes, I still program in Fortran. And I’m proud of it. Every so often I tell my colleagues that it’s finally time for me to pick up a new programming language. Maybe C++. Or Java. Lately, Python. But then I sit down in a quiet place and the urge passes. You just can’t beat Fortran, and here’s why:
- The goto statement. Nothing says “I’m the boss, and you’re the servant” to the computer quite like the goto statement. Go HERE and do THIS. Yes, I know that it’s fallen out of favor now that computer scientists have taken over computers and ruined all the fun with “structured programming” and similar barbarities. A well-structured program marches forward like a crisply-organized military parade. But I think a program should be more like a boat ride down a meandering river – you just never know where you’re going to end up.
- Fortran puts you in contact with the history of computers. With the older Fortran compilers, any part of your Fortran code that exceeded 72 characters on a line would be ignored. Why? Because that’s the number of spaces on a punch card! (No, I have never used punch cards. I’m not that old). And nothing beats the fun of putting your nose up on the screen while you count the characters in every line. But it's easier just to get more and more cautious about exceeding the 72 character
- limit until your program
- starts to look like
Does the phrase "Do not fold, spindle, or mutilate" mean anything to you?
- Nothing is quite as confusing as a poorly documented Fortran program. Yes, I know that any program can be confusing if it’s badly documented, but Fortran excels in this regard. Once you’ve inserted lots of goto statements, so that your program looks like a bowl of spaghetti, and you’ve neglected to write any comment statements (I’m in a hurry), and the program is just one big block without any subroutines (I already said I’m in a hurry), the final product will be nearly incomprehensible. Hey, it’s my program. Why would anyone else need to understand it? Besides, if my program should fall into the hands of terrorists, I wouldn’t want them to use it to understand the nature of the dark energy in the universe. I once wrote a program that grew so complex that I no longer fully understood what it was doing. That’s why we call it “research.”
- Fortran won’t “nanny” you. My Toyota won’t even let me open the door unless the transmission is shifted into park, and it’s constantly whining at me if a door is left ajar, or somebody forgot to wear seat belts. Fortran lets you open up all of its doors and cruise down the highway at 80 miles an hour without seat belts. Exceeding the dimensions of an array? No problem! Fortran will just overwrite some other area of the memory –you probably weren’t using it for anything important anyway. No need to declare variable types at the beginning of the program (like I said, I’m in a hurry) – just remember that variables beginning with “i” through “n” are integers, and everything else is a real number (or is it “j” through “p”?) And should you accidently use the wrong variable type, Fortran will happily round off all of your real numbers to integers without even telling you. That’s service with a smile!
- Infinite loops! Is the program taking too long to run, or have I inadvertently created an infinite loop? A great excuse to stop for lunch and check back a few hours later! Goto 1.