Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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

Search: