binary selectors ambiguity and space

nicolas cellier ncellier at
Sat May 13 22:10:06 UTC 2006

Le Samedi 13 Mai 2006 23:34, Ralph Johnson a écrit :
> Spaces SHOULD be important.  I think indentation should be important,
> too. People find them easy to understand.  It is computers that get 
> confused by them.  Make things easier for people, not computers.

Hi Ralph,

You are right, but that's exactly our point: make things easier for people.

Our problem is not the case when we have separators or indentations.
Our problem is try to avoid ambiguity when there are no separator.

One way would be to force user to introduce these separators, as proposed by 
Wolfgang, but i dislike it because user could not write anymore x-1. Even if 
space bar is large, we are so lazy... And it's annoying for backward 

This is why I proposed another solution, add a precedence rule that says x+-1 
is always interpreted as (x) + (-1), and not (x) +- (1).
But that solution is not perfect since (y:=1. x+-y) would not be interpreted 
the same as (x+-1), something breaking formal beauty, and maybe some users 
common sense...
This is why i propose to warn the user with a dialog box in case such 
construct is used in interactive environment.

This is also why Wolfgang suggestion to force the separator, if not my 
favourite, is not something crazy. That help keeping language clean and 
uniform, something also related to making people life easier...

> (I'm not suggesting that Smalltalk pay attention to indentation, or
> advocating any major change to Smalltalk.  But I do think that all
> arguments of the form "spaces should not matter" are completely
> bogus.)
> -Ralph Johnson

You must take into account that we must satisfy both people that like to input 
separators and people that don't...


More information about the Squeak-dev mailing list