6 ms·
My first programs were written in FORTRAN II. The language was really quite terrible; I wish I still had some of those programs I wrote, I'd like to see how the
by todd8 11y ago
My first programs were written in FORTRAN II. The language was really quite terrible; I wish I still had some of those programs I wrote, I'd like to see how they looked written before Dijkstra's "GOTO considered harmful".
To me, programming during that time, it seemed like FORTRAN's evolution stalled at a critical period between FORTRAN IV and FORTRAN 77. I'd been exposed to LISP, PL/1, SOBOL, and APL in my university programs and it was frustrating to use FORTRAN IV for non-numerical projects. The last time I did so was around 1974 when I wrote a LR parser generator in FORTRAN IV. The lack of mechanisms for handling structured data made it a messy job.
It was at that point that I came across the source for the Wirth's first Pascal compiler that ran on the computation center's CDC 6400. I learned Pascal by studying that code and I never wanted to go back to FORTRAN (or PL/1).
A few years later the greatly improved FORTRAN 77 became available, but it was too late. C and Pascal were real and gaining ground and Algol 68, CLU, Alphard, Scheme, the Red and Blue languages, and ADA had captured the imagination of the language designers.
- walshemj 11y agoThat's what RATFOR was for. RATFOR was pre-processor for Fortran that improved in those areas
- kjs3 11y agoErr...minor nit...since Alphard was never implemented, it's not really a competitor. Couple of pretty interesting papers came of it tho.
- todd8 11y agoYes, it was a fun time for programming languages, lots of new and ultimately seminal ideas were being explored on the pages of SIGPLAN and conference proceedings. C and Pascal were practical languages and, in some programming domains, Scheme and Ada were too. If FORTRAN 77 came out in 1972 I think it might have stayed in the game, but things were developing quickly. And as you point out correctly, language features were being explored more quickly than they could be implemented. CLU even more than Alphard is an example of an academic experiment in language design that had a profound influence on the future of real programming languages. Exceptions -- C++ exception handling comes from the ideas found in CLU. Object oriented programming -- The name CLU comes from cluster because Barbra Liskov recognized the importance of compound data structures (objects, but she called them clusters) that supported an explicitly defined interface of functions (methods). These ideas were inspired by Simula (an older simulation language that had support for defining the real-world things, objects, being simulated). Immutable vs mutability -- Strings were immutable, as were other elementary types. Iterators and yield -- First introduced in CLU are now common in modern languages. Call semantics -- like lisp, data is passed by sharing a reference to the data, in contrast to the way FORTRAN or Algol passed parameters. Java and many other languages now use these call semantics, not just Lisp of Scheme. Multiple assignment -- operations (methods) could return tuples that were destructured at the point of call into multiple values. Now common in modern languages. Variable sized arrays -- as I recall, the runtime was intended to handle the autosizing of vectors. I'd never seen anything like this before 1974 (except for LISP's lists). All these important ideas and more in a language no one programmed in. Other languages were pushing in new directions too. The Algol68 Revised Report came out while I was in grad school. Wow, the language spec was so interesting that SIGPLAN made it a special edition of their monthly journal. Every concept was completely generalized: arrays could have multiple dimensions and any number of these could be left out while indexing an array value resulting in a multi-dimensional slice. I've still never seen anything like this in a modern language (is it supported by R or Mathematica? I can't remember.) Again it wasn't the implementation of Algol68 that was important (the language as specified was too hard to implement) it was the ideas it suggested to future language designers--in fact, Niklaus Wirth quit the Algol68 design committee with the idea that Algol ought to go in a simpler direction, which led to Pascal.