A still sensible question about _ and :=

Andrew P. Black apb at cse.ogi.edu
Mon Apr 23 16:07:07 UTC 2001


>Using left-arrow is one issue, but the way it's done also steals a 
>character from the character set, and more importantly, from the 
>keyboard. There's no <- key on a keyboard (Well, actually there is. 
>Perhaps we should use that if we're going to free ourselves of the 
>constraints of mainstream computing conventions. It's easier to 
>reach than shift-hyphen, too).
>
>So to me, while _, especially in comments or C callouts, is an 
>issue, it's QWERTY of the moment that is a bigger problem than ASCII 
>of the 70's. After all, it's not like modern Smalltalks can't 
>display a left-arrow, they just don't replace an existing ASCII 
>character with it.

Having just had to write some stuff about the Squeak character set, I 
think that stealing _ from its normal ACSII place is indeed the 
issue.  Keybindings are NOT the issue, because they can easily be 
customized by preferences.  Nor, really, is compatibility, since we 
could make all fileout and source files use := pretty easily.

I think that we should

(1) move the arrow glyph to an unused location in the character set 
(there are lots of them, lets say Character value: 31 as a concrete 
suggestion).

(2) Put underscore back in its proper place.

(3) Fix the fonts so that the arrow glyph actually prints as an arrow 
glyph in all sizes, and underscore prints as an underscore.  This 
probably requires some trickery in the font import stuff; I'm 
waffling here because I know nothing about it.

(4) Change the fileout code so that := is always used.

(5) Possibly, add preferences to the prettyprinter and the compiler 
so that users can look at whichever of := or arrow they prefer.  (I 
strongly prefer arrow, by the way, but that is not the point.)

(6) Possibly, add preferences so that one can have the _ key insert 
an arrow, as now, and <ctrl -> inserts a _, or vice versa.  Or 
ctrl-g.  Or whatever.  We can all do our own customization on that 
one, I would guess.

What are the benefits of all of this work?  (The work is in making 
the change happen without us all having to "get off the bus"). Quite 
a number, actually.

First, file names and text files containing _ will print correctly 
inside Squeak.  Second, Squeak fileouts that I include in email and 
on web pages will print correctly, without my painstakingly having to 
replace all of the _ with little arrow.gif pictures!  Third, we will 
be able to interchange code with other Smalltalks more easily -- at 
least they would be able to file Squeak in and massage it into a 
working state.  Fourth, when I make the font size larger to give a 
demo, the code will still have arrows in it on the screen, not 
underscores, which are pretty hard to explain to a not always 
sympathetic audience.

I think that appearances are important, and this has been bugging me recently.

	Andrew





More information about the Squeak-dev mailing list