[squeak-dev] The Inbox: Collections-cwp.486.mcz

Juan Vuletich (mail lists) juanlists at jvuletich.org
Tue Aug 14 15:12:40 UTC 2012


Quoting Colin Putney <colin at wiresong.com>:

> On Tue, Aug 14, 2012 at 5:29 AM, Juan Vuletich (mail lists)
> <juanlists at jvuletich.org> wrote:
>
>> For this method, #tokenish and several others, please take a look at senders
>> & implementors of #isGenerallyValidInIdentifiers and
>> #isGenerallyValidStartOfInIdentifiers in Cuis. This style eases having a
>> consistent behavior.
>
> Can you be more specific about what you're suggesting? Are you talking
> about the distinction between the first character and the subsequent
> characters when scanning an identifier? Refactoring to reduce
> duplication? Self documenting code via clear selector names?

Yes, all that. Stating the critera in as few places as possible, and  
making it as easy to understand (and change) as possible. Avoid  
calling the preference from many places, etc.

> It's too late in the release cycle to adopt the Cuis' implementation
> wholesale—particularly since Cuis doesn't pass the all the tests I
> committed yesterday. (For example, #'_value' precedence answers 2.)
> For 4.4 I'll be happy if we can make underscore selectors work without
> having to patch the system before loading a package that contains
> them. (eg Xtreams).

I didn't suggest adopting the implementation in Cuis, just using a  
(maybe) good coding style. Adopting code from another fork requires a  
lot of care and testing to be sure of not breaking stuff. I know that.  
I do it quite often.

WRT #'_value' precedence, it answers 2 if allowUnderscoreSelectors is  
false. The question is actually meaningless in this case, as #'_value'  
is not a valid selector... If you set the preference to true, it  
correctly answers 1.

> Colin
>
>

Cheers,
Juan Vuletich



More information about the Squeak-dev mailing list