Hacker News new | past | comments | ask | show | jobs | submit login

Algol (both 60 and 68) had various representations. The reference one, used in the spec, would use formatting to indicate things such as keywords, and used the conventional mathematic and engineering symbols where they were appropriate. Here's a bit of Algol-60 grammar:

   <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.



Here's a table in a 1966 book showing the different keywords across implementations: https://archive.org/details/breuer-dictionary-for-computer-l...

(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.


Algol-60 didn't actually have the notion of keywords as such in the modern sense. The language grammar treats stuff like "if", "for" etc as fundamental terminal symbols without specifying how they're to be parsed distinctly from identically spelled identifiers. Each representation is supposed to come up with a way to make that distinction; for example, the reference representation uses bolding and/or underlining to distinguish keywords.

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.


That not symbol looks like a stand-in for ¬. Nearest I can find is: https://en.wiktionary.org/wiki/⁊ (Tironian et). If that is the case it's amusing that it actually means "and".


looks exactly like U+29A2 https://en.wikipedia.org/wiki/Miscellaneous_Mathematical_Sym... Turned angle to me


Early character sets were indeed very limited and inconsistent in many ways, which contributes to the keyword-heavy style of many early languages. (The other factor behind it was the sheer amount of features that were provided by the language itself, as opposed to library code; minimalism was not generally favored. This in turn encouraged "fancy", hard to parse syntax for those custom features.)


It’s not hard to see the reason - bolting on a feature in the compiler is way easier than implementing a language that allows stuff like this to be implemented in a library. I imagine that memory limitation also contributed to those decisions.


The very concept of "library" would take a while to evolve. The first ones were literally libraries: you'd come, browse to find code for the algorithm you need, and reuse that code - by manually copying it.

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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: