[Pharo-project] Announcer methods are bloated
Henrik Sperre Johansen
henrik.s.johansen at veloxit.no
Tue Apr 19 23:47:16 CEST 2011
On 19.04.2011 21:40, Stéphane Ducasse wrote:
> Hi Doug
> in addition I do not like to use on:do: since I prefer to keep it for exception.
> Now did you check senders of each of these methods?
> What would be a path to go to your solution. In fact subscribe:do: is not a really good name too.
> I prefer on: do: (even if I do not like the overload) and on:send:do:
> I think that we could deprecate when:do: first.
> Then may be deprecate subscribe:do:
> On Apr 19, 2011, at 8:07 PM, DougEdmunds wrote:
>> If Announcements are newly added to core (discussion at
>> why not start with a trimmed down set of methods? Why start with bloat?
>> Announcer has these two core methods:
>> 1) subscribe:do
>> 2) subscribe:send:to:
>> are fine.
>> There is no need for
>> 3) on:do (just calls 1)
>> 4) on:send:to: (just calls 2)
>> 5) when:do (also justs calls 1)
Personally, I'd keep when:do:, add when:do:for: and when:send:to, and
deprecate the rest.
Mainly because that makes it the same as what you find in VisualWorks,
so if Announcements happen to become an item for standardization some
time in the future, there's less to quarrel about :)
It also fits in nicely with being a replacement for events.
More information about the Pharo-project