From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,c52c30d32b866eae X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,2ea02452876a15e1 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,c52c30d32b866eae X-Google-Attributes: gid1108a1,public From: donh@syd.csa.com.au (Don Harrison) Subject: Re: Real OO Date: 1996/05/03 Message-ID: #1/1 X-Deja-AN: 152692259 sender: news@assip.csasyd.oz references: organization: CSC Australia reply-to: donh@syd.csa.com.au newsgroups: comp.lang.eiffel,comp.lang.ada,comp.object Date: 1996-05-03T00:00:00+00:00 List-Id: Jon S Anthony writes: :In article donh@syd.csa.com.au (Don Harrison) writes: [...] :First, classwide operations are not primitive operations and so do not :constitute the "definition" of the type. So, even from a s called :"purest" view there's nothing wrong with putting them elsewhere. :Second, when they have more than one parameter (the typical case by :far) which type/calss would they be "assigned" to? Makes no sense and :is a very artificial constraint. Pretty much agree. : Third, you do this sort of thing in :Eiffel as well: anytime you are not "just" defining a type (for :example, the "main" routine), you just have to use a contrived class. See below. [...] :> : Even with some clairvoyance you'd have trouble as you :> :couldn't know about S when T and U were defined. So, one possible :> :out would be to subclass them all and put the new frozen features :> :in these new "extraneous" classes and use them instead. :> :> Hopefully, these comments are no longer relevant. : :No, these comments are still relevant. First, clients can't define :them. Second, you still need to be clairvoyant (define the operation :in one of the classes - even if it is application specific) or :introduce contrived/extraneous classes. Another way to look at this :is that classwide operations allow you to take arbitrary universal :views of things - without having to go back and inappropriately fudge :the class definitions. Sorry, I don't see the problem. All you need to do is add the new operation to one of the classes. The supplier still declares it and you don't need to know ahead of time that it is required. It's semantically exactly the same as shoving it in a package somewhere. No extraneous classes are necessary. [...] :> Is this what is meant by multiple dispatching? : :Yes.(tm/Kosh) What's tm/Kosh? :/Jon :-- :Jon Anthony :Organon Motives, Inc. :1 Williston Road, Suite 4 :Belmont, MA 02178 : :617.484.3383 :jsa@organon.com : /// Don. (o o) =-=-=-=-=-=-=-=oOO=-(_)-=OOo=-=-=-=-=-=-=-=-