|
You will pry my goto s from my cold dead hands.
finite automata, FTW
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
In 1987, I was in my pre-final year of Mechanical Engineering degree. Computers were new, having been introduced in India in early 80's, and programming was entirely new to me. Getting hands onto a computer was indeed rare, and somehow I got hands on a VAX VMS mainframe system. Compiling, linking, running - were all new. I had just learnt that there's something called as a 'file' - because the only files known were office files. And we were writing 'files' to implement the Newton Raphson method, the Regula Falsi method, etc.
Against this backdrop, GOTO was indeed a saviour, because what it did was indeed magic. And all my files were not more than 70 or 80 lines long, as it was college-level code.
|
|
|
|
|
It rather depends whether you are talking about the 'vanilla' GOTO statement. which exists, in some form, in most languages, and at least arguably has a limited number of valid uses, or Fortran's 'Computed GOTO', which I can only recall using once in my life as a Fortran programmer, and which is probably one of the most bug-prone programming constructs ever devised!
|
|
|
|
|
One of my Computer Science professors back in the late '80s had the memorable quote: "Be wary of anyone who refers to Fortran77 as 'the new Fortran'."
|
|
|
|
|
During my student days, we wrote a spoof Fortran language proposal to add the COMEFROM statement to replace the much derrided GOTO
|
|
|
|
|
According to Wikipedia, the first comefrom dates back to 1973.
My first encounter with comefrom was in the Babbage programming language, from 1981 (Babbage - The language of the future[^]). Babbage has a lot of other nice features, such as the 'conditional threat statement: DO so and so OR ELSE; For function calls, you have not only call by value and call by reference, but also call by long distance. For case switches, it has the BRIEF CASE statement to encourage portable programming.
A few years ago, I needed programmatic access to the backtrace in an exception handler (maybe there were libraries to do it, even at that time, but I found none, and it wasn't that much work doing it myself). 'ComeFrom' was an obvious name for the stack traversal routine, to show where execution came from when walking into the code causing the exception.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Nothing wrong with that Richard
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
|
Seems you are not quite up to date if you are making such statements.
And thus don't know the difference between FORTRAN and Fortran...
|
|
|
|
|
Old timers Fortran programmers are retiring and need replacements.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Maybe they can become trainers, coaches. Income after retirement.
|
|
|
|
|
The problem with that is, whoever of the old gurus said (in the 1970s): 'I don't know what languages will look like in year 2000, but they will be called Fortran!'
Fortran 2023 has very little to do with the Fortran I learned in my studies in 1978-83. (Fortran was limited to the first two years.) I do not recognize today's Fortran as anything even vaguely resembling what I learned back then. If I were to teach it, I would first have to learn it as a new language.
Is GOTO at all a relevant statement in modern Fortran?
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Agree.
As I remember, FORTRAN 90, which I came across in the late 90's had the concept of Pointers. Today's FORTRAN may even have the concept of Classes. And the GOTO may be like "Hey GOTO, GO AWAY FOREVER".
|
|
|
|
|
Yes, it's good to know .. and the comment on their page adds some reasonable explanation:
"... Less than half a year ago, the new ISO Fortran 2023 definition was published. ... Fortran appears to be fast, having native mathematical computation support, mature, and free of charge. Silently, slowly but surely, Fortran gains ground. It is surprising but undeniable. ..."
So, it's time to find my Fortran FFT code which I used back then ...
modified 7-May-24 14:31pm.
|
|
|
|
|
From what I've heard, its the NAG, the UK-based Numerical Algorithms Group, which has mainly been responsible for the continued usage of Fortran.
|
|
|
|
|
I would guess it has to do with supercomputers in large part. Fortran has been used with them for decades and still is. Nvidia has support for CUDA in Fortran and that makes it possible to adapt code to run on GPUs which almost every modern supercomputer has these days.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Quote: I would guess it has to do with supercomputers in large part. That's possible indeed ... Perhaps surprisingly, there is a lot of up-to-date information, for example Fortran - Wikipedia, it makes me also think about possible use in LLM training ...
|
|
|
|
|
'mother tongue' for me as well.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
When I learned C I forgot Fortran, and was happy!
|
|
|
|
|
I had a class in C and FORTRAN in 87/88. I already knew FORTRAN, and I took it mostly for the C.
The teacher tortured us by assigning programs to be solved in the language least suited to solve the problem.
Write some numerical algorithm in C( not FORTRAN ).
Write some parsing and word counting code in FORTRAN(not C)
Kind of proved the point that you can solve any problem with any language.
|
|
|
|
|
Can we compare this with filling a round hole with a square peg? Only that the hole and peg are made of somewhat flexible rubbery material.
|
|
|
|
|
1971 1st year university Computer Science - FORTRAN IV on an IBM 360 with the WATFOR compiler which later became WATFIV. Punched cards and IBM golfball terminals.
Then onto IBM 370 then onto CDC 7000 series all with FORTRAN IV. All this mixed with COBOL, PL/1 and assembler.
Currently working with C# and thinking about learning Angular
|
|
|
|
|
I thought I'd need a card puncher to write true Fortran ...
(remembering that dangerous type of stack)
|
|
|
|
|
I have been writing Fortran since 1989 and have never used a punched card (or tape)
|
|
|
|
|
Around 1980 we had to use the puncher in my first Fortran class in the university.
Later I bought a Z80-PC with an 8" floppy - what a progress!
|
|
|
|