specifically to support ALGOL’s /\ and \/
Boolean operators. No source is provided for the claim.)
The trouble probably started for real
with the C programming language’s
need for two kinds of and and or operators. It could have used just or and
bitor, but | and || saved one and three
characters, which on an ASR- 33 teletype
amounts to 1/10 and 3/10 second, respectively.
It was certainly a fair trade-off—just
think about how fast you type yourself—
but the price for this temporal frugality
was a whole new class of hard-to-spot
bugs in C code.
Niklaus Wirth tried to undo some of
the damage in Pascal, and the bickering
over begin and end would no } take.
C++ is probably the language that
milks the ASCII table most by allowing templates and operator overloading. Until you have inspected your data
types, you have absolutely no idea what
+ might do to them (which is probably
why there never was enough interest to
stage an International Obfuscated C++
Code Contest, parallel to the IOCCC for
the C language).
C++ stops short of allowing the programmer to create new operators. You
cannot define :-: as an operator; you have
to stick to the predefined set. If Bjarne
Stroustrup had been more ambitious on
this aspect, C++ could have beaten Perl
by 10 years to become the world’s second write-only programming language,
after APL.
How desperate the hunt for glyphs is
in syntax design is exemplified by how
Guido van Rossum did away with the
canonical scope delimiters in Python,
relying instead on indentation for this
purpose. What could possibly be of such
high value that a syntax designer would
brave the controversy this caused? A
high-value pair of matching glyphs, {
and }, for other use in his syntax could.
(This decision also made it impossible
to write Fortran programs in Python, a
laudable achievement in its own right.)
The best example of what happens
if you do the opposite is John Ouster-hout’s Tcl programming language. De-
Result of the Go Language asR33 compatibility test.
spite all its desirable properties—such
as being created as a language to be
embedded in tools—it has been widely
spurned, often with arguments about
excessive use of, or difficult-to-figure-out placement of, {} and [].
My disappointment with Rob Pike’s
Go language is that the rest of the
world has moved on from ASCII, but
he did not. Why keep trying to cram an
expressive syntax into the straitjacket
of the 95 glyphs of ASCII when Unicode
has been the new black for most of the
past decade?
Unicode has the entire gamut of
Greek letters, mathematical and technical symbols, brackets, brockets, sprockets, and weird and wonderful glyphs
such as “Dentistry symbol light down
and horizontal with wave” (0x23c7). Why
do we still have to name variables Ome-gaZero when our computers now know
how to render 0x03a9+0x2080 properly?
The most recent programming language syntax development that had
anything to do with character sets apart
from ASCII was when the ISO-C standard committee adopted trigraphs to
make it possible to enter C source code
on computers that do not have ASCII’s
95 characters available—a bold and decisive step in the wrong direction.
While we are at it, have you noticed
that screens are getting wider and wider
these days, and that today’s text processing programs have absolutely no
problem with multiple columns, insert
displays, and hanging enclosures being
placed in that space?
But programs are still decisively ver-
tical, to the point of being horizontally
challenged. Why can’t we pull minor
scopes and subroutines out in that
right-hand space and thus make them
supportive to the understanding of the
main body of code?
Related articles
on queue.acm.org
A Conversation with Arthur Whitney
http://queue.acm.org/detail.cfm?id=1531242
You’re Doing It Wrong
Poul-Henning Kamp
http://queue.acm.org/detail.cfm?id=1814327
how not to Write Fortran in Any Language
Donn Seeley
http://queue.acm.org/detail.cfm?id=1039535
Reference
1. pike, r. systems software research is irrelevant;
http://herpolhode.com/rob/utah2000.pdf.
Poul-henning Kamp ( phk@freeBsD.org) has
programmed computers for 26 years and is the inspiration
behind bikeshed.org. His software has been widely
adopted as “under the hood” building blocks. His most
recent project is the Varnish Http accelerator, which is
used to speed up large Web sites such as facebook.
© 2010 acm 0001-0782/10/1100 $10.00