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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news2.google.com!newsfeed.gamma.ru!Gamma.RU!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Virtual Components in Ada and Ruby Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1dvcq9fimqv12.g8zq212sn8fw$.dlg@40tude.net> <9r6dnRAyibfBolnfRVn-oA@megapath.net> Date: Fri, 1 Jul 2005 12:04:37 +0200 Message-ID: <1tkdjjsnyzc93.1rt1l7fm3eopl$.dlg@40tude.net> NNTP-Posting-Date: 01 Jul 2005 12:04:40 MEST NNTP-Posting-Host: 54d0d2eb.newsread2.arcor-online.net X-Trace: DXC=?8A\CUo@XC>F:^Y;boJ3Y0Q5U85hF6f;4jW\KbG]kaM8U7^]5?JhlB>j7R_3gB@jC9[6LHn;2LCV>7enW;^6ZC`4<=9bOTW=MN> X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:11811 Date: 2005-07-01T12:04:40+02:00 List-Id: On Thu, 30 Jun 2005 13:55:18 -0500, Randy Brukardt wrote: > 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. So the set of operations in this case is (simplified) "." and ".:=". The point is that there must be a better separation of implementation and interface. Why something publicly declared as a tagged record cannot be implemented using an access type? > 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. It is not an additional feature in my view. It is less features, though also a structural language reform. I'd like to remove predefined types classes as much as possible. > 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). Right. Slices and aggregates must become first-class citizens, first. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de