[squeak-dev] Re: Selectors with underscores

Andreas Raab andreas.raab at gmx.de
Thu Mar 11 17:59:35 UTC 2010

On 3/11/2010 9:10 AM, Torsten Bergmann wrote:
> If true an underscore is accepted and any code with underscores
> is loadable without patching the image/Scanner class.
> Does that satisfy anybody?
> Please feel free to review and integrate if accepted.

I did a quick adoption of your code to print out all sites that would be 
compiled differently and run it in trunk where it resulted in only one 
site needing change (PNGReadWritre>>test1). Then I ran it in an 
Etoys-dev image and the result was significantly different. There's a 
lot of code that uses at least x_ foo (i.e., no space between var name 
and underscore).

I'm wondering: I don't really know how the people who want underscores 
plan to use this, but would it make sense to scope this differently, 
i.e., either on a per-class or even a per-method basis?

Per class would be my favorite because in a system where you'd like to 
use underscores globally you'd just have Object 
class>>allowUnderscoreSelectors return true. And in other systems you 
could still have MyGlorpConnector>>allowUnderscoreSelectors enabling it 
for the cases you care about.

   - Andreas

More information about the Squeak-dev mailing list