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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public From: doylep@ecf.toronto.edu (Patrick Doyle) Subject: Re: Separation of IF and Imp: process issue? Date: 1997/09/06 Message-ID: #1/1 X-Deja-AN: 270144607 X-Nntp-Posting-Host: skule.ecf Sender: news@ecf.toronto.edu (News Administrator) References: <33E9ADE9.4709@flash.net> <34106A26.4DC3@link.com> Organization: University of Toronto, Engineering Computing Facility Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-09-06T00:00:00+00:00 List-Id: In article <34106A26.4DC3@link.com>, Samuel Mize wrote: > >Jon S Anthony wrote: >> >> In article doylep@ecf.toronto.edu (Patrick Doyle) writes: >> >> > Ok, I'll boil my position down into one question: What does >a separate >> > interface file do for a class that an abstract superclass can't do? > >The structure of the question shows an assumption. Not all Ada >packages are classes -- nor should they be. (I am assuming that >an Eiffel "class" is an object-oriented construct exporting a >data type that implements objects of that class.) > >In Ada we're often working with different paradigms. The classic >example is a utility package exporting a bunch of math routines. >This isn't a "class" unless you extend the concept of "class" >until it loses all object-oriented significance, and becomes in >essence an Ada package instead. (In languages without a >packaging construct, this often happens.) This "math" example is a prime example of an approach called "mixin" classes, whereby a set of functions is collected into a class, and clients which want to use these functions inherit from this class. It's a fairly common object-oriented pattern in environments supporting multiple inheritance. For example the math functions could go into a class called MATH_USER, so classes which inherit from this can use math features because instances of the subclass are now also instances of MATH_USER. In other words, this "utility package" concept seems to have lots of "object-oriented significance" to me. >However, it appears (from postings by another Eiffel user) that >you are extending the meaning of the superclass concept, in >essence creating a special-purpose idiom. Nothing wrong with >that, they exist in every language. Ada directly supports this >idiom because system partitioning and decomposition are >extremely important in its intended domain. To tell the truth, I'm starting to think this is a Good Thing. (Believe it or not, I started off thinking it was good, but came into this debate playing devil's advocate.) -PD -- -- Patrick Doyle doylep@ecf.utoronto.ca