binary selectors ambiguity and space

Wolfgang Helbig helbig at Lehre.BA-Stuttgart.DE
Mon May 15 21:47:05 UTC 2006


Hi language designers,

I tried a Unix command to find all one character binary selectors followed
immediately by a minus character:
	$ grep '[+/\\\*~<>=@%|&?!,]-' SourcesFile
	
The above beauty spotted nine occurrences in a Smalltalk-80 sources file from
April 1, 1983:

in Form>>shapeFill:interiorPoint:
	dirs <- Array with: 1 at 0 with: -1 at 0 with: 0 at 1 with: 0 at -1.

in ListView>>deEmphasizeView
	aRectangle <- aRectangle insetOriginBy: 0 at -1 cornerBy: 0 at 0
	
and seven occurrences in Cursor class>>initialize, similar to
	offset: -5 at -7.

And, seeing this, I do not want to be forced by my proposal to enter a space 
between @ and -. And I do not want to learn complicated rules when and where I 
have to hit the space key. So, the best to do in this case is to keep it as it 
is. At least I've learned from this thread why the minus character is special 
cased in the syntax diagrams. Thanks to all of you for teaching me!

Greetings
Wolfgang
--
Weniger, aber besser.




More information about the Squeak-dev mailing list