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: 103376,2ea02452876a15e1 X-Google-Attributes: gid103376,public From: jsa@organon.com (Jon S Anthony) Subject: So called Real OO (was blah blah blah...) Date: 1996/02/26 Message-ID: #1/1 X-Deja-AN: 141157465 sender: news@organon.com (news) references: organization: Organon Motives, Inc. newsgroups: comp.lang.ada Date: 1996-02-26T00:00:00+00:00 List-Id: In article bobduff@world.std.com (Robert A Duff) writes: > You seemed to object strongly to the idea that one can put two types in > the same package, on the grounds that it decreases encapsulation. On > the contrary, it *increases* encapsulation. When two types are closely > related to each other, by their nature, *forcing* them to be in separate > modules means that *more* operations need to be exported from each > module. Yes, but in this context (Eiffel) it is mostly irrelevant. This is because the two classes can export the "detail stuff" to each other _only_. This is from selective export, in particular the optional part of a feature clause (listing its client classes). See ETL 7.12 and 7.13. > mentioned above, about putting list-cursor information inside the list > itself? If you have multiple tasks, you definitely want to have two > tasks iterating through the same shared list (or whatever data > structure). Has the standard class library been changed to solve this > problem? I think you are confused here. Iteration is effected by inheriting from say, list_iteration, when defining some class that needs to be "iterated over". In effect, list_iteration supplies only the pattern, so the particular class has the "cursor" (which is not accessible in any event). To handle more than one iteration, you repeatedly inherit list_iteration (renaming bits as appropriate). Now, the real problem here (as has been discussed to death on c.l.e) is that the repeated inheritance machinery exists in the main to support this iteration aspect and it is rather complicated and subtle machinery to handle such a simple thing. In some respects this bit is the Eiffel counterpart "dirty laudry" to the "mutual withing" problem in Ada: Yes, you can get the thing to work, but it isn't pretty. /Jon -- Jon Anthony Organon Motives, Inc. 1 Williston Road, Suite 4 Belmont, MA 02178 617.484.3383 jsa@organon.com