BCPL in the new millenium (was: Proposal3: Make $_ a validide
ntifier cha...
Andrew P. Black
black at cse.ogi.edu
Sat Jun 3 01:35:19 UTC 2000
At 13:06 -0500 2000.6.2, Parker, Mike wrote:
>
>Hey! what'd they do with all the '$(' and '$)' symbols?????
>It doesn't even look like BCPL!!!
I first met BCPL running on Strachey's Modular One at Oxford.
Although the language was essentially the same as Richard's, the
syntax was far superior, mainly because Strachey had insisted on
having teletypes and a line printer that actually supported a
reasonable character set.
Specifically, the hardware character set included upper and lower
case letters, three of the four arrows (right for conditional, down
for indexing), multiply, logical "and" and "or", a matching pair of
quotes(!), and four sets of brackets {, [, ( and "Section brackets"
that were used to delimit code blocks; the open section bracket was a
double S section symbol (§) and the close section bracket was the
same thing with a vertical bar running through it.
The full Modular One Internal character code also included a few
characters that were not on the printers, but which could be produced
(more or less) by overprinting: divide (÷), $, #, and lambda.
All this was done with 7 bits. The 8th bit was used to indicate
underlining. Just as in many of the contemporary books, we used
underlining to indicate keywords. The underscore key on the Olivetti
teletypes was a "dead" key, like an accent, and you typed the keyword
let, say, by striking _l_e_t.
The Oxford version of BCPL also included "Manifest Functions", which
were used to simulate abstract data types, and ... objects. For
example, Next[aStream] was a manifest function, i.e., one that could
be compiled inline; its body was aStream <downarrow> STREAM_NEXT
[aStream], i.e., apply the function that is stored in the STREAM_NEXT
(a small integer) element of the aStream vector to aStream itself.
What this did, of course, depended on the kind of stream that you had
... sound familiar?
I still have a few listings from those days ...
Incidentally, manifest constants were by convention all caps, and
words therein were broken by an underlined space (STREAM_NEXT). All
other identifiers used studley caps.
For those interested in more reminiscences, The Journal of Higher
Order and SYmboli Computation has just published a special issue
commemorating the 25th anniversary of Strachey's death. It is online
at http://www.wkap.nl/sampletoc.htm?1388-3690+13+1/2+2000 (at least,
that URL is for a "free sample" edition of the Journal, which just
happened to be the right one when I tried it.)
Andrew
More information about the Squeak-dev
mailing list
|