Re: Unicode Bloopers

From: Otto Stolz (
Date: Thu Apr 21 2005 - 05:55:25 CST

  • Next message: Hans Aberg: "Re: Unicode Bloopers"

    Hans Aberg schrieb:
    > In math, changing
    > styles usually changes the math semantics, because it is used to
    > indicate different logical objects. For example, "sin" in plain or
    > boldface would mean different things, as opposed to say the natural
    > language English, where the semantics is the same word "sin". Now, in
    > computer code, the semantics does not change either, styles are only
    > used to make the code more legible. For example, a computer language
    > would not accept "sin" in both plain and boldface, and assign different
    > meanings to the two words.

    This is not entirely true. There are (or rather: used to be) at least
    two computer languages that distinguish between plain and boldface words,
    viz. Algol 60 and Algol 68.

    In Algol 60, delimiters are either non-letter characters (such as “[”),
    or boldface words, such as “begin” (in boldface); identifiers (such as
    “sin”) are plaintext words; so you could well have both a bold “do”
    (between head and body of a loop) and a plain “do” (meaning, e. g.,
    Thursday, in German), in the very same program. As virtually all I/O
    equipment in the sixties lacked boldface (and mostly also lower case),
    the boldface words were usually enclosed in single, symmetric quotes,
    e. g. “'BEGIN'”, or “'begin'”.

    In Algol 68, as in Algol 60, delimiters are non-letter characters,
    or boldface words, and identifiers are plaintext words. Whilst Algol 60
    has a closed set of delimiters, in Algol 68 the programmer can declare
    additional delimiters, viz. Operators and Modes (aka “declarators”, in
    Algol 60, “types” in most other languages); so you could even have
    both a sinus operator (“sin” in boldface) and a sinus function (“sin”
    in plain), in the very same program. A more realistic example: both
    bold “i” delimiting the real, and imaginary, parts of a complex number
    literal and plain “i” as a loop index, in the same program. In the
    seventies, Unicode was not invented yet, so the boldwords were either
    written in all uppercase (delimiter “I” vs. identifier “i”), or with
    a preceding point (“.i” vs. “i”), at the programmers discretion.

    Best wishes,
       Otto Stolz, programmig-languages archeologist ;-)

    Example program:
       Note: The accompanying <>
             is not an example of Algol 60, but rather of Algol 60 MCP,
             a dialect featuring reserved words rather than the scheme
             outlined above.

       J. W. Backus & al., Peter Naur (ed.): “Revised report on the
       algorithmic language ALGOL 60”, Numerische Mathematik 4 (1963),
       p 420‒453, ISSN 0029-599X; also in Comm. ACM, and in J British
       Computer Soc.; Reprint (1965) Springer-Verlag Berlin, Heidelberg,
       New York

       Adriaan van Wijngaarden & al.: “Revised report on the algorithmic
       language ALGOL 68” (1974), Technical report, Univ. of Alberta,
       Dep. of Computing Science, ISSN 0316-4683; also in
       Algol bulletin 36: Supplement, ISSN 0084-6198

    This archive was generated by hypermail 2.1.5 : Thu Apr 21 2005 - 05:56:34 CST