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-Thread: 103376,16bd8131a17b875d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 30 Jun 2005 13:52:12 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1dvcq9fimqv12.g8zq212sn8fw$.dlg@40tude.net> Subject: Re: Virtual Components in Ada and Ruby Date: Thu, 30 Jun 2005 13:55:18 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Message-ID: <9r6dnRAyibfBolnfRVn-oA@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-KHwGiFIJIc/QPc04I5gbdWWqtxKO5rfylGy6CkFiHmzasVsNoA+wQPqsboPTC8xrk8XxMPE3Tl/GHCP!bY/p4IcWc9aCopQQNTe+NsxNzIhd1QRaZRjifkY7jhdynwB9B2eMbQSYzuh/SFTiwBWJEz9JqjAu X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.31 Xref: g2news1.google.com comp.lang.ada:11771 Date: 2005-06-30T13:55:18-05:00 List-Id: "Alexander E. Kopilovich" wrote in message news:mailman.120.1120146983.17633.comp.lang.ada@ada-france.org... > Dmitry A. Kazakov wrote: > > > I think that "record interface" could drastically improve Ada. > > At least, after that addition it would not be possible to say that Ada is > clearly inferior to Object Pascal/Delphi in this respect. > > Stubborn resistance to this feature in Ada somehow resembles that infamous > long-lived absence of enumerations in Java. I'm not sure what you guys are talking about, but certainly there has been no "resistance" to virtual components - I don't think they've ever been proposed or discussed before. Yesterday was the first time I can recall ever seeing anything like that. But the whole idea seems misguided to me - programs shouldn't be exporting components [including discriminants] (virtual or otherwise) in the first place. All of that should be hidden with a set of operations to access them, construct them, and the like. Ada 200Y certainly has made that easier by giving real constructors to limited types, so there should no longer be any reason to expose any components. As always, I can think of a handful of exceptions to the rule (just like there are a few types that probably shouldn't be tagged and derived from Controlled or Limited_Controlled), but there aren't enough of these to justify any additional language features. There's a better argument for a virtual array capability, because that has properties that are tough to emulate with subprograms. But even that's questionable (especially in face of the difficulties of defining and implementing slices and aggregates for such things). Randy.