binary selectors ambiguity and space

Wolfgang Helbig helbig at Lehre.BA-Stuttgart.DE
Sat May 13 20:46:45 UTC 2006

Hi Dan,
you explained:
>Well, the *idea* was that you should not need spaces, and St-76, borrowing from 
>APL, had a different character for the semantically different high-minus sign 

What's so bad about needing spaces? After all, the space key is one of the 
easiest to hit :-). And spaces are already required as separators between 
keywords and argument names, aren't they?. It seems quite natural to require 
spaces as separators between a binary selector and a "special character" like 

Then you could get rid of the special treatment of the minus character. That is, 
the minus character would be allowed as a second character of a binary selector.

This change would simplify the grammar and slightly enlarge the expressivenes of 
the language -- at the cost of needing a separator between the one character 
binary selector #- followed by a minus as part of a number literal.

Here is the change of the grammar expressed in EBNF:

special_character ::=
	+ | - | / | \ | * | ~ | < | > | = | @ | % | | | & | ? | ! | ,

binary_selector ::= special_character [special_character]

See also at
for the EBNF meta characters and some other modifications I've proposed for the

Weniger, aber besser.

More information about the Squeak-dev mailing list