Xref: utzoo comp.lang.misc:7232 comp.object:3002 comp.lang.eiffel:1484 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ames!uhccux!munnari.oz.au!mel.dit.csiro.au!yarra!bacchus!matt From: matt@bacchus.esa.oz (Matt Atterbury) Newsgroups: comp.lang.misc,comp.object,comp.lang.eiffel Subject: Re: CHALLENGE: typing and reusability Message-ID: Date: 1 Apr 91 23:37:35 GMT References: <22032@yunexus.YorkU.CA> <11820:Mar1923:59:3591@kramden.acf.nyu.edu> <19MAR91.22493670@uc780.umd.edu> <18271:Mar2013:19:1091@kramden.acf.nyu.edu> <1991Mar20.214231.3411@neon.Stanford.EDU> <1121@tetrauk.UUCP> <1 Sender: matt@bacchus.esa.oz.au Organization: Expert Solutions Australia. Lines: 41 In-reply-to: hoelzle@neon.Stanford.EDU's message of 31 Mar 91 21:57:21 GMT In article <1991Mar31.215721.18687@neon.Stanford.EDU> hoelzle@neon.Stanford.EDU (Urs Hoelzle) writes: NOTE: ... Here's the scenario on which my claim is based: 1) You haven't written A and B yourself but bought them from someone. That is, you cannot change A or B to inherit from a common base class. I consider this as an absolutely unavoidable problem (more justification below). : : How many of these problems would be solved if the language allowed the addition of 'class utilities' (as described p.82 of Booch's OODwA) to _any_ class at _any_ time (i.e. even if you don't have the source code). I _believe_ you would still have to add such utilities to sub-classes by hand due to Eiffel's default non-inheritance of `methods' ? With this facility, you could make a bought-in class (BiC) look exactly like you want it to. You could do this now by subclassing the BiC and adding your utilities to this new class, however the point of a HLL is to make the programmer's life easier - consider buying an Eiffel encapsulation of the entire X windows library and making all/many of its classes handle the method jump_through_the_hoop ! [ a `class utility' is a non-primitive `method' which only uses primitive methods to do its work (i.e. doesn't play with state directly) ] Note that I do not use Eiffel in Real Life so do not know for sure that one can/cannot do the above. Also, I am probably commiting heresy by not using the `right' terminology (e.g. method) :-). -- ------------------------------------------------------------------------------- Matt Atterbury [matt@bacchus.esa.oz] Expert Solutions Australia, Melbourne UUCP: ...!uunet!munnari!matt@bacchus.esa.oz "klaatu barada nikto" or: ...!uunet!murtoa!bacchus.esa.oz!matt "consider this a divorce" ARPA: matt%bacchus.esa.oz.AU@uunet.UU.NET "life? don't talk to me about life!"