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: 109fba,c890e6ab3fb2c5fc X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,c890e6ab3fb2c5fc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-20 08:04:19 PST Newsgroups: comp.lang.ada,comp.lang.c++ Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!csn!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!news.sprintlink.net!EU.net!chsun!mlma11.matrix.ch!user From: Mats.Weber@matrix.ch (Mats Weber) Subject: Re: ADA Objects Help! Message-ID: Sender: usenet@eunet.ch Organization: ELCA Matrix SA References: <3f9g1u$j4m@nps.navy.mil> <3fcs59$70s@nps.navy.mil> <3ff186$c19@gnat.cs.nyu.edu> <3fjk7t$2km@gnat.cs.nyu.edu> Date: Fri, 20 Jan 1995 16:04:19 GMT Xref: nntp.gmd.de comp.lang.ada:18115 comp.lang.c++:87291 Date: 1995-01-20T16:04:19+00:00 List-Id: In article <3fjk7t$2km@gnat.cs.nyu.edu>, dewar@cs.nyu.edu (Robert Dewar) wrote: > "why not packages and package types" > [...] > Basically the conclusion is that following this line of thought leads > (a) to excessive complexity, it is very tricky to work out all the > ramifications I can't see why unless you provide more precise information. Package types, _provided they cannot export types or exceptions_, are basically equivalent to record types, except that they can export subprograms (to be used as methods). > (b) to a confusion of concepts, packages are not happy extended in this > direction, and it causes a confusion (unification???) of types and packages. > The final decision of the Ada design is that this would have confused rather > than unified. I think this is more a question of personal preference. > (c) the building of the OOP notions on top of derived types is much more > powerful and general, and avoids some of the limitations that come from > a narrow, distinguished object approach. Package types do not preclude the use of derivation + class-wide types as the inheritance mechanism (I think). I built my proposal using subtyping as the inheritance mechanism, much along what N. Cohen did in his paper on extendible record types. If I re-did it now, I'd use another mechanism, probably something like Modula-3's subtyping rules. Mats