[squeak-dev] Selectors with underscores

Torsten Bergmann astares at gmx.de
Thu Mar 11 17:10:01 UTC 2010

>Can code with underscore assignment still 
>be loaded?

Dont know ... at least it should since this works:

   | foo |
   foo _ 1

although i would go here with Sam about readability ;)

Attached is a changeset for latest trunk (3.11alpha#9676)
so you can try yourself.

It has a Preference (see PrefBrowser -> compiler -> allowSelectorsWithUnderscores) which is false by default.

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.

Thanks to Ian Piumarta for the original idea/changeset...


P.S: Typically the pref is included/initialized in 
     Parser class>>initialize but I dont call this method 
     in the postscript. The postscripts adds the preference
     directly. This will preserve existing compiler settings.

GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnderscoresInSelectors.1.cs
Type: application/octet-stream
Size: 3216 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100311/76a52bf6/UnderscoresInSelectors.1.obj

More information about the Squeak-dev mailing list