6 ms·
As a fan of Algol 68, I'm pretty excited for this. For people who aren't familiar with the language, pretty much all modern languages are descended from Algol
by zik 10mo ago
As a fan of Algol 68, I'm pretty excited for this.
For people who aren't familiar with the language, pretty much all modern languages are descended from Algol 60 or Algol 68. C descends from Algol 60, so pretty much every popular modern language derives from Algol in some way [1].
[1] https://ballingt.com/assets/prog_lang_poster.png https://ballingt.com/assets/prog_lang_poster.png
- dhosek 10mo agoFinally.
- nine_k 10mo agoIf PL/I was like a C++ of the time, Algol-68 was probably comparable to a Scala of the time. A number of mind-boggling ideas (for the time), complexity, an array of kitchen sinks.
- int_19h 10mo agoIt certainly has quite a reputation, but I suspect it has more to do with dense formalism that was quite unlike everything else. The language itself is actually surprisingly nice for its time, very orthogonal and composable.
- j2kun 10mo ago> I'm pretty excited for this Aside from historical interest, why are you excited for it?
- zik 10mo agoI've actually been toying with writing an Algol 68 compiler myself for a while. While I doubt I'll do any major development in it, I'll definitely have a play with it, just to revisit old memories and remind myself of its many innovations.
- ofalkaed 10mo agoPersonally, I think the whole C tangent was a misstep and would love to see Algo 68 turn into Algo 26 or 27. I sort of like C and C++ and many other languages which came, but they have issues. I think Algo 68 could develop into something better than C++, it has some of the pieces already in place. Admittedly, every language I really enjoy and get along with is one of those languages that produced little compared to the likes of C (APL, Tcl/Tk, Forth), and as a hobbyist I have no real stake in the game.
- inkyoto 10mo agoWhilst I think that C has its place, my personal choice of Algol 26 or 27 would be CLU – a highly influential, yet little known and underrated Algol inspired language. CLU is also very approachable and pretty compact.
- uecker 10mo agoI wonder about what you think is wrong with C? C is essentially a much simplified subset of ALGOL68. So what is missing in C?
- pjmlp 10mo agoProper strings and arrays for starters, instead of being pointers that the programmer is responsible for doing length housekeeping.
- uecker 10mo agoArrays are not pointers and if you do not let them decay to one, they do preserve the length information.
- pjmlp 10mo agoThey surely behave like one as soon as they leave local scope. Kind of hard when passing them around as funcion parameters, and the static trick doesn't really work in a portable way. Lets seen how far WG14 gets with cybersecurity laws with this kind of answers being analysed by SecDevOps and Infosec experts.
- Taniwha 10mo agoI would argue C comes from Algol68 (structs, unions, pointers, a full type system etc, no call by name) rather than Algol60
- inkyoto 10mo agoThat is indeed correct. Kernighan in his original book on C cited Algol 68 as a major influence.
- adrian_b 10mo agoC had 3 major sources, B (derived from BCPL, which had been derived from CPL, which had been derived from ALGOL 60), IBM PL/I and ALGOL 68. Structs come from PL/I, not from ALGOL 68, together with the postfix operators "." and "->". The term "pointer" also comes from PL/I, the corresponding term in ALGOL 68 was "reference". The prefix operator "*" is a mistake peculiar to C, acknowledged later by the C language designers, it should have been a postfix operator, like in Euler and Pascal. Examples of things that come from ALGOL 68 are unions (unfortunately C unions lack most useful features of the ALGOL 68 unions. which are implicitly tagged unions) and the combined operation-assignment operators, e.g. "+=" or "*=". The Bourne shell scripting language, inherited by ksh, bash, zsh etc., also has many features taken from ALGOL 68. The explicit "malloc" and "free" also come from PL/I. ALGOL 68 is normally implemented with a garbage collector.
- themafia 10mo ago> it should have been a postfix operator, like in Euler and Pascal. I never liked Pascal style Pointer^. As the postfix starts to get visually cumbersome with more than one layer of Indirection^^. Especially when combined with other postfix Operators^^.AndMethods. Or even just Operator^ := Assignment. I also think it's the natural inverse of the "address-of" prefix operator. So we have "take the address of this value" and "look through the address to retreive the value."
- adrian_b 10mo agoThe "natural inverse" relationship between "address-of" and indirect addressing is only partial. You can apply the "*" operator as many times you want, but applying "address-of" twice is meaningless. Moreover, in complex expressions it is common to mix the indirection operator with array indexing and with structure member selection, and all these 3 postfix operators can appear an unlimited number of times in an expression. Writing such addressing expressions in C is extremely cumbersome, because they require a great number of parentheses levels and it is still difficult to see which is the order in which they are applied. With a postfix indirection operator no parentheses are needed and all addressing operators are executed in the order in which they are written. So it is beyond reasonable doubt that a prefix "*" is a mistake. The only reason why they have chosen "*" as prefix in C, which they later regretted, was because it seemed easier to define the expressions "*++p" and "*p++" to have the desired order of evaluation. There is no other use case where a prefix "*" simplifies anything and for the postfix and prefix increment and decrement it would have been possible to find other ways to avoid parentheses and even if they were used with parentheses that would still have been simpler than when you have to mix "*" with array indexing and with structure member selection. Moreover, the use of "++" and "--" with pointers was only a workaround for a dumb compiler, which could not determine by itself whether it should access an array using indices or pointers. Normally there should be no need to expose such an implementation detail in a high-level language, the compiler should choose the addressing modes that are optimal for the target CPU, not the programmer. On some CPUs, including the Intel/AMD CPUs, accessing arrays by incrementing pointers, like in the old C programs, is usually worse than accessing the arrays through indices (because on such CPUs the loop counter can be reused as an index register, regardless of the order in which the array is accessed, including for accessing multiple arrays, avoiding the use of extra registers and reducing the number of executed instructions). With a postfix "*", the operator "->" would have been superfluous. It has been added to C only to avoid some of the most frequent cases when a prefix "*" leads to ugly syntax.
- somat 10mo agoYes, massively influential, but was it ever used or popular?, I always think of it as sort of the poster child for the danger of "design by committee". Sure it's ideas spawned many of today's languages, But wasn't that because at the time nobody could afford to actually implement the spec. So we ended up with a ton of "algols buts" (like algol but can actually be implemented and runs on real hardware).
- dboreham 10mo agoUsed extensively on Burroughs mainframes.
- Taniwha 10mo agoBurroughs used an Algol60 derivative (not '68)
- pjmlp 10mo agoESPOL initially, which evolved into NEWP.
- Taniwha 10mo agoESPOL was (is?) simply a version of the standard Algol compiler that let you do 'system' sorts of things. The Burroughs large systems architecture didn't really protect you from yourself, system security/integrity depended on only letting code from vetted compilers run (only a compiler could make a code file, and only a privileged person could make a program a compiler) - so the Algol 60 compiler made code that was safe, Espol could make code that wasn't, could do things a normal user couldn't - you kept the espol compiler somewhere safe away from the students .... (there was a well known hole in this whole thing involving mag tapes)
- pjmlp 10mo agoAs mentioned it evolved into NEWP, and you can get all the manuals from Unisys, as they keep selling it. Given its architecture, it is sold for batch processing systems where security is paramount. Yes, ESPOL and NEWP, being one of the first systems languages with UNSAFE code blocks, a binary that is compiled having unsafe is tainted and requires administrator configuration before being allowed to execute by the system. One cannot just compile such code and execute it right away.