Path: utzoo!attcan!uunet!mcvax!ruuinf!piet From: piet@ruuinf.UUCP (Piet van Oostrum) Newsgroups: comp.lang.misc Subject: Re: Algol 60 vs Algol 68 (was "stack machines (Burroughs)") Message-ID: <492@ruuinf.UUCP> Date: 16 Jun 88 15:46:23 GMT References: <1521@pt.cs.cmu.edu> <1532@pt.cs.cmu.edu> <476@pcrat.UUCP> <2868@louie.udel.EDU> <370@dlscg1.UUCP> <3147@polyslo.UUCP> <10064@tekecs.TEK.COM> <1988Jun11.200757.12285@light.uucp> Followup-To: comp.lang.misc Organization: Univ of Utrecht, Dept of CS Lines: 48 In-reply-to: bvs@light.uucp's message of 12 Jun 88 03:07:54 GMT In article <1988Jun11.200757.12285@light.uucp> bvs@light.uucp (Bakul Shah) writes: In article <10064@tekecs.TEK.COM> Andrew Klossner writes: > ... >There really isn't any "beyond" to Algol 68 since the 1975 Revised >Report. It's a dead language. And that's too bad; while its model of >computation is distant from that of real machines (making it an >inappropriate language for most low level systems programming), it does >an admirable job in its stated domain of algorithmic description, and >is great for applications programming. Actually Algol 68's model quite closely matches real machines and the language can be compiled to generate code as efficient as compiled C; though I doubt there are any modern, optimizing compilers for it. The language is verbose and the its syntax rather od (!) but it can be used quite effectively for systems programming. I recall the CAP operating system (for the Cambridge CAP computer) was written in Algol 68. I wonder how much of C design was influenced by Algol 68 as most of K&R C seems to map almost directly to Algol 68 and where C differs is usually where the compiler's job is simplified. Come to think of it, a major subset of Algol 68 with a new and concise syntax (sort of like C's) can make a very elegant, type safe and well rounded language. I wrote major parts of both an Algol 68 and an Algol 60 compiler, so I assume I know a bit of the difficulties. Regarding ALGOL 68 and C, I think there are a lot of ideas from Algol 68 in C, but -- as in Pascal -- C left out a lot of the hard things. The syntax of C is much closer to Algol 68 than Pascal. Also some Algol 60 syntax crept into C, e.g. function headers. Now any of the left out features from Algol 68 (e.g. heap variables, dynamic arrays) are not very difficult to add to implement, BUT if you add two or more features at the same time they are going to interact in a terrible manner. The complexity of the resulting compiler is almost exponential to the number of added features. One example: dynamic arrays are easy: Algol 60 had it, see also the discussion on alloca in this newsgroup. Unions are easy: C has them. The combination of dynamic arrays and union however forces you to use the heap, and hence garbage collection. Although I must say I like garbage collection very much, it assumes that you have a perfectly secure language, which C isn't. -- Piet van Oostrum, Dept of Computer Science, University of Utrecht Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands Telephone: +31-30-531806 UUCP: ...!mcvax!ruuinf!piet