[ENH] Display := when pretty printing ( [sm][et][er][cd][approved] )

Richard A. O'Keefe ok at cs.otago.ac.nz
Fri Oct 17 00:20:44 UTC 2003


"Peter van Rooijen" <squeak at vanrooijen.com> replied:
	Sure, [ANSI Smalltalk] has problems.  But not so many that it
	can't be extremely useful anyway.

To repeat what I wrote in a different way:  it is a badly written description
of a very useful thing.  We agree.

	> The ANSI Smalltalk standard says that "_" is a character that is usable
	> in identifiers.  I think this is a Good Thing and I would like Squeak to
	> support it.
	
	That is a very good example.  Squeak could easily support it.
	Why it is not done?  I don't know.
	
Because "x_y z" means "x := y z" in Squeak whereas it would have to
mean "(x_y) z" in ANSI Smalltalk, where x_y is a single identifier.
If people always put spaces around their assignment arrows, there
wouldn't be a problem:  _ as a token would be assignment, any other
_ would be underscore.  But there's a lot of code without spaces.

	> Note, by the way, that ":=" is incompatible with mathematical usage.
	
	'Incompatible'? In which way is it incompatible with that? Perhaps you
	simply mean 'different'?
	
No, I mean "incompatible".

	> In mathematics "x := y" doesn't mean "change x to have y as value",
	
	It doesn't mean that in Smalltalk either.
	
Yes it does.  The purpose of assignment is precisely to change the variable
on the left hand side.  It'd be a funny kind of assignment that _didn't_
change the variable.  (It doesn't change the _name_ of the variable, of
course.)

	> it means "define x to be y all the time".
	
"Change the value of x" and "Permanently define x" are quite incompatible
readings.  They aren't just different, they are contradictory.

	I am thinking back to what ASCII stands for, American Standard
	Code for Information Interchange (at keast, that's what they
	told me in school it stands for).  To me it says that where you
	want to achieve Information Interchange, it is a good idea to
	have a Standard Code.

ASCII stands for *American* standard code for information interchange.
The first version was released in 1963, and didn't have lower case letters.
It did have left arrow and up arrow.  The second version was released in
1967, and did have lower case letters, but didn't have left arrow or up
arrow any more.  It also changed several control characters.

	I might add to that the more you want Information Interchange,
	the more you probably want a Standard Code.
	
The problem is that ASCII isn't even very good for English; the English
writing system uses left and right single and double quotes (not present
in ASCII), the letter ash (rare, but present in my father's name), in
some words good typography uses an oe ligature, there is the diaeresis
and the stress mark, and there are several kinds of dashes.  And of course
there are many languages which ASCII does quite a bad job with, like French,
German, Swedish, &c.  A standard code that _can't_ represent the information
you want to represent is not one you can actually use.

The international version of ASCII is called ISO 646, which leaves fully
10 of the ASCII printing characters open for national variants to define.
#[]^_ are among those characters.  There are lots of variants of ISO 646.
The fact that ASCII _isn't_ a worldwide standard has caused all sorts of
information interchange problems.

Well, ASCII was beautifully suited to 7-track paper tape and 7-track
magnetic type, but those days are dead and gone.  I loved ASCII well,
but I am here to bury it, not praise it.

These days we _have_ an international standard for character data
interchange, which is a serious attempt to do a tolerable job for all
living scripts and most of the understood dead ones.  It's Unicode.
It has nearly 100 000 characters and still growing.  And it _isn't_ ASCII.

	And conversely, if Information Interchange isn't high on your
	list of goals, then why bother using a Standard Code?
	
It is precisely because Information Interchange *is* high on my list of
goals that I want *TODAY'S* international character set standard, which
is why I *don't* want ASCII any more.

(By the way, as far as I know, some of the old-established computer
manufacturers in America are still using EBCDIC, which is not ASCII nor
an ASCII extension.)



More information about the Squeak-dev mailing list