[prev in list] [next in list] [prev in thread] [next in thread]
List: squeak-dev
Subject: Re: [squeak-dev] #shutdown vs #shutdown:
From: Levente Uzonyi <leves () caesar ! elte ! hu>
Date: 2017-12-29 20:40:45
Message-ID: alpine.DEB.2.02.1712292132010.28196 () login03 ! caesar ! elte ! hu
[Download RAW message or body]
On Thu, 28 Dec 2017, Fabio Niephaus wrote:
> Hi all,
> SmalltalkImage>>processShutDownList: sends #shutdown: to all classes in \
> ShutDownList, yet there are classes that don't implement #shutdown: but #shutdown. \
> One example is ExternalSettings class>>shutDown, ExternalSettings is in \
> ShutDownList. Can someone explain how this is supposed to work or why there is no \
> error when the image is shutting down?
It may be tempting to implement #shutDown when you don't need the
argument, but I suggest you should not use it, ever.
Why? Because if someone implements #shutDown: in a superclass of yours,
your #shutDown method will (probably) not be sent, and tracking down such
bugs is rather time consuming.
Same applies to #startUp.
Also, the argument is useful in almost all cases, it's just that people
probably forgot to use it. That alone gives about a second overhead to
image saving. So, please use the argument.
Actually both #shutDown and #startUp should be deprecated some way.
Levente
>
> Best,
> Fabio
>
>
[Attachment #3 (text/plain)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic