Le 5/9/15 22:42, Tudor Girba a écrit :
+1.

We already deprecated on:send:to:/on:do: and I think we should do the same for the subscribe:send:to:.
Thanks Doru. I thought the same. Because each time I read subscribe: my mind stops for about half or a second until I remember that this is
the same as when: send: to:

Doru

On Sat, Sep 5, 2015 at 10:24 PM, stepharo <[email protected] <mailto:[email protected]>> wrote:

    Hi

    in announcer we have

    when: anAnnouncementClass send: aSelector to: anObject
        "Declare that when anAnnouncementClass is raised, anObject
    should receive the message aSelector.
        When the message expects one argument (eg #fooAnnouncement:)
    the announcement is passed as argument.
        When the message expects two arguments (eg
    #fooAnnouncement:announcer:) both the announcement and the announcer
        are passed as argument"

        ^ self subscribe: anAnnouncementClass send: aSelector to: anObject


    could we reduce the cognitive load and make sure that the API is
    only one protocol for example when: send: to:?
    I found it confusing and I have to check that this is indeed the same.
    I think that having one way is far enough.

    What do you think?
    Stef




--
www.tudorgirba.com <http://www.tudorgirba.com>

"Every thing has its own flow"

Reply via email to