A still sensible question about _ and :=

Henrik Gedenryd Henrik.Gedenryd at lucs.lu.se
Tue Apr 24 10:46:22 UTC 2001


Andrew P. Black wrote:

> 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).

There is already a thing called a FormSetFont that could do most of this,
with existing support in text editors. The special apple-logo-s in the old
welcome window was a glyph in such a font.

In this way, we'd use a substitution map from pedestrian ascii operator
tokens (etc.) to glyphs in a special FormSetFont. Eg. all methods would use
a standard-ascii representation on disk etc, but these tokens would be
replaced by special glyphs in editors (as per a pref of course). This pref
off -> no fancy stuff; type and see := etc all the time.

e.g.

':=' on disk <--> a-nice-left-arrow on screen

'~=' could be an overstruck equal sign,

and so on.

It could be even more useful for one's own domains, as say matrix algebra or
set manipulations or whatever. Once it would work for := you'd get the rest
for free.

> (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.

This solution would avoid manipulating existing fonts, using this special
'Symbol' font/library instead. Which is a good thing.
 
> (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.

4, 5: exactly. 6: some special key bindings dictionary for all such mappings

Plus an auto-generated yellow-button submenu from which you can insert these
special signs.

What's the down side? That this doesn't get an automatic spot at the top of
my to-do-list. But this solution is not a lot of work since most of the font
support is already there.

Henrik






More information about the Squeak-dev mailing list