[squeak-dev] Re: Selectors with underscores

karl ramberg karlramberg at gmail.com
Fri Mar 12 15:29:05 UTC 2010


On Fri, Mar 12, 2010 at 4:00 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
> On 3/11/2010 3:51 PM, Torsten Bergmann wrote:
>>
>> But my "Scoping? Why?" question was more a
>>
>>  - "Why should we do that, when other Smalltalk dialects dont?".
>>  - "There is no scoping for this in others Smalltalk, so WHY should
>>     Squeak artificially have it."
>>  - "Why would we limit Squeak to allow it only to specific classes?"
>>  - "Why should we go an own route again here?"
>
> Isn't it obvious? Because Squeak has a history. And it's worth discussing if
> we want to break that history or not, and to what extent.
>
> "All the other Smalltalks" do not use underscores as assignments so all of
> the above questions are besides the point. This discussion is about Squeak
> and should be about Squeak. Scoping provides a relatively easy way out since
> it allows you to benefit from using underscores in selectors while allowing
> others to use underscores as assignments in their respective subsystems.
>
> BTW, just for the records, my *personal* opinion is expressed in Croquet:
> Forbid underscore altogether.
>
>> I stand my original suggestion/changeset which
>>
>>  a) either disallows selectors with underscore for the whole image
>>      ->  turn preference off
>>
>>  b)  ->  turn preference on
>>     fully allows one to file in and use code from other Smalltalk
>>     systems or implement the use case where you need an underscore
>>     in a selector in whatever class you require
>>
>> This would reduce the balkanization of Smalltalk (see [1]) a little
>> bit and allow for easy exchange and freedom in implementation.
>>
>> If one really mixes "underscore assignment" and "underscores in selectors"
>> then I would rather see x_ 1 converted to x := 1 or at least x _ 1
>>
>> Hey it's all code and changeable! Especially when we have tools
>> like RefactoringBrowser, Rewrite Tool, ... and a dynamic system
>> that is able to tell us where such code exists.
>
> Having a working implementation of a tool that that automatically rewrites
> underscores into assignments on fileIn and MC package install would go a
> VERY long way to alleviate my concerns. In fact, even a prototype that
> illustrates the concept might be enough for now because it may encourage
> others to help.
>
> Cheers,
>  - Andreas
>
>
This would be great.
I this tool also could change method categories to extensions and
class categories to a single package it would rock !
It could even be interactive so one could decide case by case what to
do with each class, method and "underscore in case of literal".

Karl



More information about the Squeak-dev mailing list