Home About Subscribe Search Member Area

Humanist Discussion Group

< Back to Volume 34

Humanist Archives: May 18, 2020, 11:26 a.m. Humanist 34.27 - punctuation in the assignment statement

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

        Date: 2020-05-18 10:19:33+00:00
        From: Willard McCarty 
        Subject: punctuation in the assignment statement

Here follows a rather lengthy prelude to a question in the history and
psychology of programming. Help, please!

Anyone who has read David Crystal's Making a Point: The Pernickety Story
of English Punctuation (2015) will know that many have attempted to fix
the semantics of punctuation in English but none succeeded, though
Lindley Murray's English Grammar (1795) established a long-lasting
convention that has survived well beyond the Oxford English Dictionary.
My specific interest in punctuation is in the colon as it is used in
programming when combined with the equals-sign. This occurs in what are
known as assignment statements, e.g. in ALGOL and other languages
influenced by it, thus:

X := Y + Z

In FORTRAN, as you may know, the equivalent is written (disturbingly to
some mathematicians) thus:

X = Y + Z

This looks like algebra but isn't truly algebraic because it is an
imperative statement ('set the value of X equal to the sum of Y and Z')
rather than a declarative one ('the value of X is equal to the sum of Y
and Z'), as in algebra. Many have objected for very good reasons, mostly
on the grounds that students who come to programming with a background
in maths tend to become confused.

Now for the historical bit. Within the first decade of digital computing
it became obvious that programmers would fold under the burden of
writing machine instructions. As Grace Hopper remarked, machines were
getting faster but programmers weren't. One of the differences in how to
design a standard high(er)-level programming language that would make
programming easier and quicker centred on the assignment statement,
specifically how to write it. Alan Perlis roughly sums up the story:

 > …Americans, following the FORTRAN approach, had the variable being
 > assigned to on the left. The Europeans had it on the right. The
 > Americans used an equals sign for the assignment, thus hiding the
 > fact that there is a direction to the assignment; the Europeans used
 > a directed arrow pointing to the right. When ALGOL 58 came out,
 > neither equals nor directed arrow was used, but a colon-equal and it
 > pointed to the left. (Wexelblat, History of Programming Languages, 1981:
 > 142)

Hence X := Y + Z!

My question is this: why the colon? What was this mark of punctuation
meant to suggest, or better, what would it have suggested and what does
it continue to suggest? The OED note on the colon as a mark of
punctuation (rather than as a part of our anatomy) is a succinct
statement of the conventional sense that would have been nigh universal
in English usage in the mid 20th Century:

 > Its best defined use is to separate clauses which are grammatically
 > independent and discontinuous, but between which there is an
 > apposition or similar relation of sense. Thus it may introduce an
 > antithetic statement, an illustration, extract, etc.

I suppose, then, that in the ALGOL lingo the colon functions as an
appositional qualifier, a cognitive pause and a warning as to how the
equals-sign is to be read. (I am getting here into the psychology of
programming, into how on some level we read and write ALGOL and similar
languages.) So I translate "X is to be MADE equal to the sum of Y and
Z". Or, we might say, "Warning: this is NOT an algebraic statement!" Or,
better, I think: "Here we must stretch our understanding of mathematics
to include something new."

Is there any supporting historical evidence for my supposition?

Many thanks for any pointers.

P.S. Perlis' reference to "the Europeans" should have been more specific
to give credit to Heinz Rutishauser, who in his foundational paper
Automatische Rechenplanfertigung bei programmgesteuerten Rechenmaschinen
(1951, published 1952) introduced what he called the "Ergibtzeichen",
which looks to me like a right-pointing arrow superimposed on an
equal-sign. Clarity! If only... 
For the source materials see:


Willard McCarty (www.mccarty.org.uk/),
Professor emeritus, Department of Digital Humanities, King's College
London; Editor, Interdisciplinary Science Reviews
(www.tandfonline.com/loi/yisr20) and Humanist (www.dhhumanist.org)

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.