4 ms·
I haven't used a modern Fortran, but for older versions , the biggest surprise was the lack of reentrance.
by readthenotes1 1y ago
I haven't used a modern Fortran, but for older versions , the biggest surprise was the lack of reentrance.
- adrian_b 1y agoIndeed, reentrance and recursivity and the use of stacks and/or heaps for dynamic memory allocation have appeared in programming languages that have descendants still used today only in 1960, in ALGOL 60 and LISP I. These features have become ubiquitous in the later programming languages, all of which have been at least partially inspired by ALGOL or LISP. Fortran is the only surviving programming language older than that (first specification in 1954 and first implementation in 1956). Cobol is the only surviving programming language equally old with LISP and ALGOL, so that it has not been influenced by either of them. Thus now Fortran and Cobol are the only surviving programming languages from the era when only static memory allocation was used in programs, though their later versions have added most modern programming language features.
- pjmlp 1y agoDepending on where you place them, there are still some folks having to deal with NEWP, PL/I and RPG, which are of similar vintage.
- adrian_b 1y agoPL/I was released in 1965 and it was designed during 1964, i.e. much later than ALGOL and LISP. Moreover, it has been explicitly designed with the purpose of combining the best features of ALGOL, FORTRAN and COBOL. It has also added heap-based dynamic memory allocation like in LISP, but for deterministic behavior it has introduced the equivalent of "malloc" and "free", instead of using a garbage collector (manual memory allocation management is thus younger than both the use of garbage collectors and of reference counting, both of which have been in use since 1960). Therefore PL/I is clearly a language derived from ALGOL and LISP, besides FORTRAN and COBOL. PL/I is also one of the 3 sources from which the C language has inherited, besides BCPL and ALGOL 68. RPG (Report Program Generator, 1959) is indeed old, but it is a special-purpose programming language, like SQL, not a general-purpose programming language. I have never encountered NEWP, but AFAIK it is a much more recent language, from the seventies. While almost all general-purpose programming languages designed after 1960 have incorporated the features introduced by ALGOL and LISP, such as block structure with local variables dynamically-allocated in a stack, allowing reentrancy and recursivity, and also with heap-allocated variables without restrictions on the freeing order, there have also been various languages with limited purpose, which have been kept intentionally very simple, by omitting many of the features of standard programming languages. However for such more recent simplified languages, omitting features has been a design target, while in the languages from the fifties such features were missing not because they were not desired, but because it was not yet clear how to implement them.
- pjmlp 1y agoNEWP is from the early 1960's, it is the evolution of ESPOL used in Burroughs, released in 1961. As for the rest, I hardly consider 1960's languages, only a decade older than original ALGOL and LISP, when most knowledge sharing was only done via conferences, scientific papers, or people moving between universities and companies research labs that much different, in age and industry impact they contributed to. On the other hand, we are still fighting to get mainstream systems programing as safer as those languages in late 1950's, early 1960's, allowed for. Or as interactive as LISP for that matter, including the whole jump into debugger and redo kind of workflow.
- johnisgood 1y agoI am not sure if it is OK to post links to libgen, but there are a couple of nice books for Modern Fortran (in no particular order): - https://libgen.is/book/index.php?md5=47FDC7E85997AE8641E1A562CD03A6C8 https://libgen.is/book/index.php?md5=47FDC7E85997AE8641E1A56... - https://libgen.is/book/index.php?md5=DBB7CD9552330FE92F032F5D8EECB69A https://libgen.is/book/index.php?md5=DBB7CD9552330FE92F032F5... - https://libgen.is/book/index.php?md5=A574CCCD425E4A8788AEC617D5A5C98E https://libgen.is/book/index.php?md5=A574CCCD425E4A8788AEC61... - https://libgen.is/book/index.php?md5=366378CECB17B2D42286A32A99B3272C https://libgen.is/book/index.php?md5=366378CECB17B2D42286A32... - https://libgen.is/book/index.php?md5=6881885F023742BB5C82D2EB6FA2619F https://libgen.is/book/index.php?md5=6881885F023742BB5C82D2E... I hope this helps some, if interested.
- timonoko 1y agoIf you had to be weird you added RECURSIVE-word into the function definition. Then it failed somewhat gracefully. Otherwise your self-referencing program destroyed the machine. In large organization you could not be sure on what machine the stack was run and what version of Fortran it had.