Home About Subscribe Search Member Area

Humanist Discussion Group


< Back to Volume 34

Humanist Archives: May 25, 2020, 8:07 a.m. Humanist 34.54 - punctuation in the assignment statement

                  Humanist Discussion Group, Vol. 34, No. 54.
            Department of Digital Humanities, King's College London
                   Hosted by King's Digital Lab
                       www.dhhumanist.org
                Submit to: humanist@dhhumanist.org




        Date: 2020-05-25 06:34:17+00:00
        From: C. M. Sperberg-McQueen 
        Subject: Re Humanist 34.53

In Humanist 34.53, Norman Gray suggests, as have others in slightly
different formulations, that the committee which specified Algol 58
is likely to have been influenced in its choice of basic symbols by
the keyboards in use at the time:

     The language designers decided it would be useful to lexically
     distinguish assignment from an equality test, they presumably cast
     around in their memories for a suitable symbol available using the
     keyboards in front of them, which would have some level of
     intuitive affordance to the language's users, ':=' fitted the
     bill, and thus made they it so.

That this scenario appeals to many of us can be seen by the regularity
with which some variant of it appears in postings to this thread.

Unfortunately, it can easily be shown false by the account given in
the Algol 58 report itself and by the actual content of the report.
This has been pointed out several times over the last week, though for
reasons apparently connected to Humanist's consistently erratic mail
handlers none of the messages have appeared in Humanist.  With this mail
I would like to make one last attempt to outwit Humanist’s
black hole for incoming mail and rehearse some of the relevant factual
background.

Some salient points:

- The Uniscope 300 keyboard pointed to by NG as a sample of what might
have inspired the Algol 58 committee, became available as a commercial
product about 1964 (as did the IBM 029 keypunch machine pointed to by
WMcC in the same role), about six years too late to have served as a
point of reference.

- The committee's report on the language says explicitly that the
choice of symbols was not guided by the availability of characters on
existing equipment:

    The characters [of the reference language] are determined by ease
    of mutual understanding and not by any computer limitations, coder
    notation, or pure mathematical notation.

- On the contrary, the reports on what we now know as Algol 58 and on
Algol 60 distinguish systematically among the reference language, the
publication language, and the language's 'hardware representations',
which are expected to vary across machines and countries.

- It is in the reference language that := appears as the signal for
assignment.  That the committee not only said that they had not
consulted current hardware limitations, but had really not done so, in
choosing the basic symbols of the reference language, seems to be
confirmed by the inclusion of a number of symbols not then (and not
now) readily available on keyboards:

   × the St. Andrew's cross symbol for multiplication
   ÷ the dotted-fraction symbol for division (in addition to the solidus)
   ≠ the negated equal sign
   ↑ ↓ → an up arrow, a down arrow, a right arrow
   [ ] square brackets
   ≤ ≥ the symbols for 'less than or equal to' and 'greater than or
equal to'
   ⋀ ⋁ ≡ the symbols for logical conjunction, logical disjunction, and
logical equivalence.

If in 1958 any group casts around in their memories for symbols
available on contemporary keyboards and then chooses that particular
inventory of signs, one can only infer that their memories of having
seen actual keyboards were hazy at best.

- The fact that the reference language used symbols not readily
available on data entry equipment was a source of criticism of the
Algol 58 and Algol 60 reports, as is clear from Jean Sammet's paper on
the development of Cobol, which has been cited earlier in this thread
and from the first comment after John Backus's paper at the 1959
conference in Paris at which he first presented what is now known as
the Backus Naur Form for grammars, also cited earlier in the thread.

It may be noted that the designers of Cobol, who made a conscious
effort to define their language in terms of characters available on
widely used data entry equipment and who were working a little later
than the group that defined Algol 58, eschewed not only St. Andrew's
cross and the other symbols listed above, but also (unless I am
mistaken) provided textual alternatives to symbols like <, >, and =.


Like some others in the thread, NG stresses the arbitrary nature of
such symbols and their interpretation; I take this to be a gentle
remonstration with WMcC hinting that he is looking for meaning in
places where none is to be found.

It is true, I think, that the assignment of symbols in languages like
Algol 58 is arbitrary in the sense that it proceeds by fiat from the
will of the language specifiers.  If they had chosen to represent
assignment by St. Andrew's cross, multiplication by the solidus, and
addition and subtraction by a down arrow and the keyword 'begin',
respectively, they would have introduced no logical contradiction in
their work.

And yet, it seems unlikely that any of the thousands of programming
languages devised over the last seventy years have chosen to represent
assignment with St. Andrew's cross, or subtraction with the keyword
'begin'.  (I have just checked: not even Brainfuck does anything of
the kind, and Snobol4 limits itself to allowing the programmer to do
so.)  Why is that?  NG has already provided the answer: like others
who over the centuries have invented notations, the designers of
programming languages seek what NG calls "some level of intuitive
affordance" to users.  This was particularly important, it appears,
for the members of the group specifying Algol 58, since one of its
explicit goals was to serve human-to-human communication of algorithms
(hence the explicit identification of a "publication language"
suitable for typesetting and journal publication, which indeed duly
ensued: in the U.S. Algol had much more success as a language for
publishing algorithms than as a language for programming computers).

Willard's initial post, then, asks (it seems to me) the entirely
reasonable question "what was the intuitive affordance provided by the
choice of := to signal assignment, and why was := preferred over, say,
a left-pointing arrow?  or a right-pointing arrow with the variable
name on the right?"  I am not much persuaded by his conjectural
answer, but the question seems to me to be a reasonable one.

After all, the history of symbolic notations is full of symbols chosen
for their ability to suggest an appropriate idea, or avoided because
of the danger of conveying a misleading idea.  (Descartes was familiar
with the symbol = for equality, and used it in that sense in at least
one letter, but generally avoided it; Florian Cajori speculates that
he may have done so because the same symbol was also in use to denote
arithmetical difference.)

So far, the only suggestions in the discussion that have not involved
anachronistic keyboards (and anachronistic assumptions that senior
academics and technical people would in 1958 have been likely to know
their way around a keyboard or a keypunch machine) are Herbert
Wender's observation that := and =: are sometimes used in mathematical
definitions (with the definiendum on the same side as the colon) and
Norman Gray's suggestion that Church's lambda calculus might be a
possible source.  Alas, my copy of Church's Introduction to
mathematical logic does not show any use of := as a symbol; as a
substitution operator Church uses S with a subscript and a
superscript.

If Church's notation influenced the group, it may have been in a
negative sense. The German and Swiss participants in the meeting
proposed to write assignment in the form

   a + 3 → s

but the American participants resisted and in Algol 58 this assignment
would take the form

   s := a + 3

It is clear from F.L. Bauer's account of this that twenty years later
he still resented the way this decision came out.  (I can relate to
that.)

Although he does not use := to denote substitution, Church does use a
special symbol to denote definitions.  And as luck would have it, he
uses the right arrow, pointing not at the definiendum but at the
definiens:  X → Y means 'X is defined as meaning Y', not 'Y gets the
meaning X'.

It may be a stretch to invoke Church at all here: McCarthy was not a
participant at this stage (and in any case McCarthy at some point
confessed to not having read Church all the way through, which is
apparently how Lisp came to have dynamic scope instead of the lexical
scope of the lambda calculus).  But one can easily imagine a
discussion beginning "wait, surely you mean for that arrow to be
pointing the other way!" "no, why?!" and ending "why don't we find
another symbol to use here?"  And one can easily imagine that
discussion finding its echo in the preliminary report's bland
reference to "ease of mutual understanding".

All in all, I am sure that the arguments in Zürich over the assignment
symbol were absolutely nothing compared to the arguments over the
decimal point.


********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
cmsmcq@blackmesatech.com
http://www.blackmesatech.com
********************************************





_______________________________________________
Unsubscribe at: http://dhhumanist.org/Restricted
List posts to: humanist@dhhumanist.org
List info and archives at at: http://dhhumanist.org
Listmember interface at: http://dhhumanist.org/Restricted/
Subscribe at: http://dhhumanist.org/membership_form.php


Editor: Willard McCarty (King's College London, U.K.; Western Sydney University, Australia)
Software designer: Malgosia Askanas (Mind-Crafts)

This site is maintained under a service level agreement by King's Digital Lab.