[squeak-dev] notNil, et al, to ProtoObject?

Chris Muller asqueaker at gmail.com
Sat Oct 26 21:04:26 UTC 2013


Well, ok, since ifNotNilDo: is on its way to deprecation anyway,
perhaps really it's just #notNil that's left missing in ProtoObject.
That and #isEmptyOrNil too, because it seems unlikely anythiing would
override that with something different.

On Sat, Oct 26, 2013 at 3:11 PM, Levente Uzonyi <leves at elte.hu> wrote:
> On Sat, 26 Oct 2013, Chris Muller wrote:
>
>> Does it make sense to have 5 of the 9 nil-testing methods on
>> ProtoObject, and the remaining 4 on Object?  It seems like the various
>> forms of nil-testing are something any code should feel free to do.
>>
>> I think we should move the remaining 4 to ProtoObject.
>
>
> It depends on the role of ProtoObject and Object. Which are those methods?
>
>
> Levente
>
>
>>
>>
>> On Fri, Oct 25, 2013 at 5:38 PM,  <commits at source.squeak.org> wrote:
>>>
>>> Levente Uzonyi uploaded a new version of Collections to project The
>>> Trunk:
>>> http://source.squeak.org/trunk/Collections-ul.542.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Collections-ul.542
>>> Author: ul
>>> Time: 26 October 2013, 12:22:26.493 am
>>> UUID: e52fefbe-fb04-46f4-a956-f7bbcb5c8965
>>> Ancestors: Collections-cmm.541
>>>
>>> Make Dictionary >> #includesKey: more lightweight.
>>>
>>> =============== Diff against Collections-cmm.541 ===============
>>>
>>> Item was changed:
>>>   ----- Method: Dictionary>>includesKey: (in category 'testing') -----
>>>   includesKey: key
>>>         "Answer whether the receiver has a key equal to the argument,
>>> key."
>>>
>>> +        ^(array at: (self scanFor: key)) ~~ nil "We could use #notNil
>>> here, but ProtoObject doesn't understand it."!
>>> -       self at: key ifAbsent: [^false].
>>> -       ^true!
>>>
>>>
>>
>>
>


More information about the Squeak-dev mailing list