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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1108a1,66253344eaef63db X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,66253344eaef63db X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-03 08:45:48 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!news.umbc.edu!eff!blanket.mitre.org!linus.mitre.org!linus!mbunix!eachus From: eachus@spectre.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada,comp.object Subject: Re: Mut. Recurs. in Ada9X w/o Breaking Encaps.? (LONG) Date: 3 Oct 94 11:29:19 Organization: The Mitre Corp., Bedford, MA. Message-ID: References: <1994Sep27.165203.9192@swlvx2.msd.ray.com> <36bt0c$17oo@watnews1.watson.ibm.com> <1994Sep29.103358@di.epfl.ch> <1994Sep29.133526.2134@swlvx2.msd.ray.com> <36hsc5$g1q@watnews1.watson.ibm.com> <1994Oct1.014758.10687@swlvx2.msd.ray.com> NNTP-Posting-Host: spectre.mitre.org In-reply-to: jgv@swl.msd.ray.com's message of Sat, 1 Oct 1994 01:47:58 GMT Xref: bga.com comp.lang.ada:6405 comp.object:7011 Date: 1994-10-03T11:29:19+00:00 List-Id: In article <1994Oct1.014758.10687@swlvx2.msd.ray.com> jgv@swl.msd.ray.com (John Volan) writes: > ... Suppose, instead of just writing package > "Employees_And_Offices", we had to write package "Company". > Suppose we tried to support not only Employees and Offices, but > also other things in the problem domain of Company management. > Things like Memos and Meetings and Job_Descriptions and > Inventories and Stock and Benefits and so on and on and on ... Hmmm... I can have a model of a company MIS environment where there is one package of high-level abstractions such as people, places, and things. I can also have lower-level abstractions, which can be a hierarchy of child packages, since I want to have this as a sub system. Seems like a reasonable approach, we just have to rename some of the types in the examples: type People is abstract tagged private; type People_Pointer is access People'Class; ...etc. Now everything at the top level seems reasonable, and the lower down decisions, such as whether consultants can be assigned offices, is implementable at the appropriate level. Adding attributes to the top level abstraction of people will require modifications to the root package, for example adding a fax number field, or a teleport address. I assume that such modifications occur at a relatively slow pace, but notice that recently we have had at least TWO additions to business cards--fax number and e-mail address. The previous sucn change was the addition of telephone numbers (or perhaps area codes for telephone numbers). But that started happening about a century ago. (Area codes started appearing in the late fifties.) The next addition will probably be photographs--the MITRE on-line directory has them now. > On the other hand, if we can manage to maintain 1 Package = 1 > Class even despite mutual recursion, then we at least have some > hope of managing a large, complex problem -- one class at a time. > Isn't that what object-orientation is all about? Here I have to disagree, but it may be an issue of terminology. In Smalltalk there is ONE superclass. Do you hear complaints about Smalltalk which state that this prevents encapsulation? No. As I see it you are really arguing that superclasses shouldn't have to "know" about subclass specific interfaces and details. Stated that way, I don't have a problem with your assertion, or with Ada 9X. However, identifying the appropriate level in the tree for a specific interface is always going to be a hard problem. And we are going to spend a lot of time fixing wrong guesses. That is a part of the design (and programming) process, and probably can never be eliminated entirely. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...