On Thu, 12 May 2005, Paul Koning wrote:
John> The inverted syntax of "goto 60 if
expression" was another that
John> caught my eye;
??? There isn't any such syntax in Algol. Maybe you misread a
statement that had a conditional expression in it -- the Algol
predecessor to what in C is (foo<0) ? 1 : 2 -- but without the
unnecessary different tokens.
There are some severe umm let's say non-linearities in the
conditional expression evaluation; the algol60 spec "explains" it
but I found it extremely hard to follow -- it allows things that
are very, very non-obvious 'if if ... then then' type things;
clearly not that but things equally weird. I forget and am too
lazy to look up.
> But you
have to feel for the poor bastards, trying to work out
> these issues where you don't even have a character mapping you can
> rely on. All the quoting/escaping bizarreness, that the unix Algol
> interpreter a60 supports. Ugh.
John> One of the aforementioned references points out that Algol
John> preceded ASCII and influenced its development. At one point,
John> they wanted 'do' and other keywords to be their own character
John> (!) so you could have 'do' as a variable name?
You seem to be talking about APL. Algol 60 has keywords distinct from
variable names, but doesn't say how to implement that. Some
implementations have used quoting, some have used reserved words. In
Algol 68, that issue was addressed explicitly rather than left
unanswered.
I don't see how Algol 60 had anything to do with ASCII. Certainly the
ASCII character set (never mind the early versions) don't match what
the Algol 60 spec uses -- things like the sign for <= or for boolean
equivalence or "not" didn't show up in standard character sets until
Unicode.
The algol designers were very careful here; it's one of the better
things they did (though it was also their undoing since it messed
up source portability (a holy grail).
Algol had *three* formal specifications, I forget what they were
called precisely, but in essence:
1. the language description, in Backus-Naur and prose.
2. The reference language (exact phrase).
3. The implemented language (not exact).
1. is obvious. 2 is an "idealized" language with a glyph for each
language component; for example:
if x < y then begin;
...
end;
"<" is a unique glyph of course, and one of the now-standard ASCII
characters; but Algol specified one for less than,
less-than-equal, divide, modulo, multiply, etc, in traditional
mathematician culture. It was stated that the glyphs/symbols used
had no particular implementation value and represented only their
meaning(s) within the language (eg. < means arithmetic less-than).
The reference language used these and was referred to as an
idealization of an implementation.
It was up to the implementors to choose parsable
characters/sequences in the local character set (back when every
machine had its own character set). I doubt any actual computer
had a character code/set with enough unique glyphs to match the
reference language; it was assumed that there would be
multi-charater mappings (I think). This was very smart. This is
how things like "<=" came about.
I vaguely remember references somewhere to implementation issues
on really small character sets (like ITA2).
It was a tough world, they made some good decisions, and some
laughably bad ones.