ian@ux.cs.man.ac.uk (Ian Cottam) (11/28/88)
I used ALGOL 68 for a few years (roughly '72-75) on and off. It is certainly true that, as certain contributors -- dare I say colleagues -- have said, that there are few things *technically* wrong wth ALGOL 68. That is, the language is internally consistent. However I came to the conclusion that there were several things that are undesirable. Here is my list (just off the top of my head -- please remember how long its been since I used the language): * Mixing of the notion of variable and pointer. e.g. INT x; is an abbreviation for REF INT x = LOC INT; (read pointer for REF if you are not initiated). It is difficult, if not impossible, to teach/learn the language whilst postponing pointer manipulation, and then you had to realise that a pointer to an integer variable has type REF REF INT. * The automatic coercion scheme involving context strengths and coercion orderings is far too complicated. I always had to resort to the book to check what was happening. An ALGOL 68 sublanguage without automatic coercions would win my vote -- at least the design is such that it would be straighforward (more than can be said for the pointers/variables problem). I think I first heard M. Sintzoff suggest this at a conference in Liverpool in the early seventies. * The Input/Output model (aside: you will have noticed by now that I am not using ALGOL 68 jargon such as `transput') is too complicated and therefore less portable and, I believe, contains most of the known bugs in the language defn. * Functions are almost first-class values, but not quite. Because of the scope/lifetime restrictions functions returning functions are not generally possible. In dialects of ALGOL 68 which remove this restriction, e.g. Flex ALGOL 68 from RSRE Malvern, UK, the language becomes much more powerful. For example, if you have true first-class functions they can serve as the module/package concept. Another solution would be partial parameterisation -- a proposal by Lindsey and others -- that just failed to make the language revision in '74. * Some small points: - the parallel construct (semaphores) used is too low level (practically all implementations ignored it) - brackets have so many meanings as to make reading a program difficult for both people and compilers. - the notion of an EXIT from a block was fairly useless as was the strange idea of being able to do a GOTO without using the word -- my favourite ALGOL 68 program is: (l:l) It is sad that there was a lot right with the language which is in danger of being lost. Andy Walker's recent example of using array displays ( ~ constants of type ``array of union of...'' ) to get round the so-called varargs problem in other languages is a good case in point. ----------------------------------------------------------------- Ian Cottam, Room IT101, Department of Computer Science, University of Manchester, Oxford Road, Manchester, M13 9PL, U.K. Tel: (+44) 61-275 6157 FAX: (+44) 61-275-6280 ARPA: ian%ux.cs.man.ac.uk@nss.cs.ucl.ac.uk JANET: ian@uk.ac.man.cs.ux UUCP: ..!mcvax!ukc!mur7!ian -----------------------------------------------------------------