[squeak-dev] Deprecating #ifNotNilDo: & friends

David T. Lewis lewis at mail.msen.com
Sat Sep 4 00:31:29 UTC 2021


On Fri, Sep 03, 2021 at 08:42:56PM +0200, Levente Uzonyi wrote:
> Hi All,
> 
> We already have #ifNotNil: which has been doing the same thing as 
> #ifNotNilDo: for about 10 years now.
> The idea is to deprecate #ifNotNilDo: softly, without raising a warning on 
> usage just like how it's done with #doWithIndex:.
> The inbox entries 60Deprecated-ul.96 and Kernel-ul.1409 contain the 
> necessary changes, while KernelTests-ul.405 has an additional test to 
> verify that no methods use #ifNotNilDo:.
> 
> 
> Levente
>

+1

This seems like a good thing to do, and the soft deprecation approach
is good.

There will be important external packages such as Connnectors that
still use the ifNotNilDo: idiom so we will want to take care to make
sure these are still loadable in modern Squeak. Meanwhile, everything
in the base image (e.g. my own misuse of of ifNotNilDo: in Chronology)
should be cleaned up.

Dave
 


More information about the Squeak-dev mailing list