by FullyFunctional · 4y ago · 0 comments
The upper case is all about human readability. I suspect ALGOL's heavy reliance on named keywords (unlike C's more extensive use of symbols) relates to the inconsistencies of character sets etc at the time of the ALGOL's definition.
IMvhO, Turbo Pascal (and Turbo Modula-2) would have been much nicer with a C-like (or Rust-like) syntax.
Disclaimer: I worked professionally in Turbo Pascal for a few years.
<arithmetic operator> ::=
+ | - | ⨉ | / | ÷ | ↑
<relational operator> ::=
< | ≤ | = | ≥ | > | ≠
<logical operator> ::=
≡ | ⥰ | ∨ | ∧ | ¬
Most of these characters were not in contemporary character sets (although some later charsets would have symbols added specifically for Algol after it became more common). Given how much variation there was at the time, Algol designers didn't even try to solve that problem - they simply said that specific implementations of Algol would map the reference representation to some hardware-specific form, to be documented by the implementation. Those hardware representations would often use keywords for some of the operators.(It uses a weird glyph for NOT that I've never seen elsewhere, probably a limitation of typesetting.)
Edit: Interesting to note that the English Electric KDF9's Algol used * at the beginning of all keywords, I suppose that's to simplify parsing, or maybe just to avoid reserving words.
So, for hardware representations, which are all linear lists of characters without formatting, they had to use some kind of escape sequence - https://en.wikipedia.org/wiki/Stropping_(syntax). The term itself comes from the most popular syntax for this, which was to put keywords in single quotes / apostrophes, but there were many other variants, including some identical to how we handle keywords today, as seen from this table.
This approach also allowed for Algol programs to be "translated" to a language other than English in a sense that a representation could be defined that used native words for keywords. This was actually used to some extent in Europe, and especially in the USSR.
Algol-60 itself didn't really have any separate compilation facilities, either, and some language semantics (e.g. call-by-name) complicate matters if you try to tack it on.