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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.130.168 with SMTP id of8mr8847619obb.27.1412803578405; Wed, 08 Oct 2014 14:26:18 -0700 (PDT) X-Received: by 10.50.61.132 with SMTP id p4mr366253igr.1.1412803578226; Wed, 08 Oct 2014 14:26:18 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!uq10no6733372igb.0!news-out.google.com!bc9ni17237igb.0!nntp.google.com!h18no3429565igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 8 Oct 2014 14:26:17 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <6168abe0-23f3-4190-a405-ffd28d9e490a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1a27a5ce-cc98-4e87-999f-feecca3b6825@googlegroups.com> Subject: Re: Ada 2005 Language Designer From: Adam Beneschan Injection-Date: Wed, 08 Oct 2014 21:26:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:22260 Date: 2014-10-08T14:26:17-07:00 List-Id: On Wednesday, October 8, 2014 1:35:37 PM UTC-7, Jeffrey Carter wrote: > On 10/08/2014 11:30 AM, Adam Beneschan wrote: > > A package is not an object, neither in the sense defined by the Ada RM = nor in > > any other relevant sense. You can't create multiple instances of it. = And > > being able to create a variable object (or constant object, or expressi= on > > that produces an object) and use the dot-notation to call an operation = of > > that object is one of the things programmers came to expect of OO langu= ages > > that Ada 95 didn't give them; Package.Operation notation is not close t= o the > > same thing. >=20 > Pkg as object was a standard technique for implementing OO designs in Ada= 83, in > which a pkg represented an object in the design. Multiple instances were > sometimes implemented as instantiations of a parameterless generic pkg. T= hat > seems like a relevant sense of "object" to me. >=20 > Of course, you couldn't have components of such things, so they clearly w= eren't > objects in the Ada sense. And you couldn't pass it as a parameter to any other subprogram, nor return= one from a function. And you couldn't declare a variable of a class type,= and then assign one or the other generic instantiation to that variable. = Those inabilities would make a generic instantiation of a package a very po= or substitute for an OO-type object.=20 But I suppose the original point, that Ada always had Object.Operation nota= tion because you could use a package as an object, may make sense. In fact= , we could make yet another case: Ada has always had Object.Operation notat= ion, as long as Operation was a record component name. And then we could t= ry to argue that a record component is a kind of operation. That should be= equally convincing. -- Adam