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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,efe03f20164a417b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-18 06:15:22 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!insosf1.infonet.net!newshost.marcam.com!uunet!world!news.bu.edu!inmet!henning!stt From: stt@henning.camb.inmet.com (Tucker Taft) Subject: Re: An observation of Ada (may offend) Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. X-Newsreader: TIN [version 1.1 PL8] References: <3kbkm1$41o@miranda.gmrc.gecm.com> Date: Sat, 18 Mar 1995 12:41:06 GMT Date: 1995-03-18T12:41:06+00:00 List-Id: R.A.L Williams (bill@valiant.gmrc.gecm.com) wrote: : h. And a special one for Ada95: poor encapsulation of objects. I can : define a 'member function' for a class by including the class in the : parameter list. Unlike C++ or Eiffel, I can do this *anywhere* in my code, : even a nested function hidden somewhere seemingly 'irrelevant'. Whereas : other features of Ada go out of their way to force the programmer to : follow 'good practice' (sometimes a matter of opinion), this seems : very lax. What are called "methods" in some OOPs are called "primitive operations" or "dispatching operations" in Ada 95. These may be defined *only* immediately within the same package spec as the type. (If a type extension is declared in a package body or declarative part, you can override inherited primtive ops there -- and only there -- for that typ extension, but you can't define any new ones.) So I don't think Ada 95 suffers from the above problem. Perhaps you were referring to something else, but I can't quite imagine what problem it would be. An example might help. We certainly never meant for Ada 95 to be "lax" ;-). : Bill Williams : bill.williams@gec-mrc.co.uk -Tucker Taft stt@inmet.com Intermetrics, Inc.