Fwd: Re: binary selectors ambiguity and space
ncellier at ifrance.com
Mon May 15 18:57:48 UTC 2006
Le Lundi 15 Mai 2006 20:25, Stephan Rudlof a écrit :
> How often are cases like
> while loading 'normal' packages?
> If I've understood correctly
> (only variables) would not make problems.
You are perfectly right, my example was stupid, but look ago in this thread,
there are a lot of senders of 0 at -25 for example in current 3.9.
Ralph also proposed to implement (Number>>@- y) as ^self @ y negated as a
> > This is why i propose the notification to raise a popup dialog only if
> > Parser>>interactive answer true.
> An idea:
> Announcement of the strict behaviour some time ago: then package
> maintainers can fix there packages (shouldn't be too hard ;-) ).
In theory, this is fine, but look how many packages are compatible with 3.8
on SqueakMap... We are all loading some older packages and cross fingers...
> On 13.05.2006 02:10, nicolas cellier wrote:
> nc> Funny, in current 3.9 spaces are ignored:
> nc> i have '1 +- 2' interpreted as (1) + (-2)
> At least, if there should be a change in the semantics - for e.g.
> allowing selector #+- in the case above -, it would be *much* better to
> fail loading a package instead of loading it silently: otherwise the
> code would just break at runtime!
You are right, the change i proposed would preserve compatibility by not
groking the last - when digit is not separated, but above case would
completely be broken...
Note that above implementation does not follow any Smalltalk-80 logic. it
means than - is a prefixed unary selector... (when no space used, it can be
considered a single literal token, it's not the same).
We can have it failing now if we want to (it is in
Parser>>primaryExpression). But later, if - is accepted as second binary
character, i cannot figure how...
More information about the Squeak-dev