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

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


Take a gander at the API of ProtoObject by arrowing through the
categories/protocols, one by one.

It's pretty clean, and I think everything we have there qualifies as
"absolutely needs", don't you?

But the one that's missing is #notNil.  I mean, we've got #ifNil: and
#ifNotNil:.  We've got #isNil but not #notNil.  Proxy code should be
able to reliably use notNil as much as isNil rather than setting a
trap.  No one will ever override notNil..

On Sat, Oct 26, 2013 at 3:43 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> On Sat, Oct 26, 2013 at 02:28:10PM -0500, 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.
>
> I don't think that *anything* should go into ProtoObject unless it
> absolutely needs to be there. Period.
>
> ProtoObject is intended to be minimal, and we should take care to
> keep it so.
>
> Dave
>
>


More information about the Squeak-dev mailing list