Allow $- anywhere in binary selector

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Allow $- anywhere in binary selector

stephane ducasse
Lukas and others

Nicolas published a version for pharo and it would be really cool if you could help me
        http://code.google.com/p/pharo/issues/detail?id=2115

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Allow $- anywhere in binary selector

Lukas Renggli
> Nicolas published a version for pharo and it would be really cool if you could help me
>        http://code.google.com/p/pharo/issues/detail?id=2115

What should I do?

- I can update the RB so that it works the same way.

- I can provide rewritten code for the complete core system that uses
ambiguous constructs like 1@-2.

For the compile changes themselves I wouldn't throw a warning, not
even in interactive mode. Also I wouldn't add a setting, that just
causes troubles in many years ahead.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Allow $- anywhere in binary selector

Nicolas Cellier
2010/3/6 Lukas Renggli <[hidden email]>:
>> Nicolas published a version for pharo and it would be really cool if you could help me
>>        http://code.google.com/p/pharo/issues/detail?id=2115
>
> What should I do?
>
> - I can update the RB so that it works the same way.
>

Yes

> - I can provide rewritten code for the complete core system that uses
> ambiguous constructs like 1@-2.
>

Compiler recompileAll will transcript the ambiguous constructs already.
If you want, that would be useful to avoid spreading my initials
everywhere (I hate spreading, at least when I add no value).

> For the compile changes themselves I wouldn't throw a warning, not
> even in interactive mode. Also I wouldn't add a setting, that just
> causes troubles in many years ahead.
>

Agree about Preferences for accepting incompatible syntax : it is poisonous.
This preference would be usefull only to load old packages, but risk
to be abused to write non conforming code.

Personnally, I want the warning. It's so easy to get bitten by ^x/-2...
It would be good to have a Preference for the warning.

Nicolas

> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Allow $- anywhere in binary selector

Lukas Renggli
>> - I can provide rewritten code for the complete core system that uses
>> ambiguous constructs like 1@-2.
>
> Compiler recompileAll will transcript the ambiguous constructs already.
> If you want, that would be useful to avoid spreading my initials
> everywhere (I hate spreading, at least when I add no value).

I guess then just my initials are everywhere. Anyway, the point is
that we fix all the places that need to be fixed. I have the RB
rewrite script that does that already, I've posted a list with all the
affected methods earlier on (there are about 30).

> Personnally, I want the warning. It's so easy to get bitten by ^x/-2...
> It would be good to have a Preference for the warning.

Yeah, maybe it is safer for casual Smalltalk programmers. I always put
spaces before and after binary selectors anyway.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Allow $- anywhere in binary selector

Stéphane Ducasse

On Mar 6, 2010, at 11:41 AM, Lukas Renggli wrote:

>>> - I can provide rewritten code for the complete core system that uses
>>> ambiguous constructs like 1@-2.
>>
>> Compiler recompileAll will transcript the ambiguous constructs already.
>> If you want, that would be useful to avoid spreading my initials
>> everywhere (I hate spreading, at least when I add no value).
>
> I guess then just my initials are everywhere. Anyway, the point is
> that we fix all the places that need to be fixed. I have the RB
> rewrite script that does that already, I've posted a list with all the
> affected methods earlier on (there are about 30).

ok

Stef

>
>> Personnally, I want the warning. It's so easy to get bitten by ^x/-2...
>> It would be good to have a Preference for the warning.
>
> Yeah, maybe it is safer for casual Smalltalk programmers. I always put
> spaces before and after binary selectors anyway.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project