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: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public From: doylep@ecf.toronto.edu (Patrick Doyle) Subject: Re: Separation of IF and Imp: process issue? Date: 1997/09/01 Message-ID: #1/1 X-Deja-AN: 269340490 X-Nntp-Posting-Host: skule.ecf Sender: news@ecf.toronto.edu (News Administrator) References: <33E9ADE9.4709@flash.net> Organization: University of Toronto, Engineering Computing Facility Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-09-01T00:00:00+00:00 List-Id: In article , Jon S Anthony wrote: >In article doylep@ecf.toronto.edu (Patrick Doyle) writes: > >> IMO, having separate interface and implementation files for the >> same package simply reinforces the somewhat antiquated notion >> that an implementation has only one interface. In fact, by >> Ada, they must have a one-to-one correspondence. > >Patrick, > >If you are going to complain about something at least get the >complaint right before going off half cocked. With child packages you >can give an implementation as many completely different interfaces as >you like. IOW, your "in fact" is not. I stand corrected. Thankyou. However, generally having corresponding interface and implementation files for the same class (or package, or whatever) does reinforce the notion that an implementation has only one interface. Clearly, the Ada method is more flexible than I had imagined, but (for example) the typical C++ methodology is a one-to-one correspondence which does tend to reinforce this notion. One other thing: Does each Ada spec for a package have to be in a separate file, or can they be together? I ask because if they need to be in separate files, then you pay for the extra flexibility of multiple interfaces with extra files. >> It has been pointed out that abstract (ie. deferred) classes can >> do the same thing with greater flexibility. > >Again - get it right. Abstract classes are analogous to abstract >types in Ada, NOT packages. I've said this before: I'm not going for an analogy here. My statement stands: deferred classes can do the same thing as interface files, and are more powerful, and are simpler because they unify nicely with existing OOP practices. -PD -- -- Patrick Doyle doylep@ecf.utoronto.ca