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-27 05:06:45 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!pipex!uknet!hrc63!gmrc.gecm.com!valiant.gmrc.gecm.com!bill From: bill@valiant.gmrc.gecm.com (R.A.L Williams) Newsgroups: comp.lang.ada Subject: An observation of Ada (may offend) Date: 27 Mar 1995 10:38:51 GMT Organization: GEC-Marconi Research Centre Message-ID: <3l64jr$308@miranda.gmrc.gecm.com> NNTP-Posting-Host: valiant.gmrc.gecm.com X-Newsreader: TIN [version 1.2 PL1] Date: 1995-03-27T10:38:51+00:00 List-Id: In article Tucker Taft wrote: : 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" ;-). No, that's what I was referring to. All I can do is apologise for activating fingers without previously engaging brain. I hadn't spotted that in the LRM and I never tried to do anything differently because, well, its not nice! The sooner someone comes out with a really good text book for Ada 95 so I can stop making boo-boos like this the better! : -Tucker Taft stt@inmet.com : Intermetrics, Inc. Bill Williams bill.williams@gec-mrc.co.uk