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,b553d2c02a2df59f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!feeder.ecngs.de!ecngs!feeder2.ecngs.de!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: limited types (Was: Records that could be arrays) 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: Date: Sat, 25 Feb 2006 12:06:20 +0100 Message-ID: NNTP-Posting-Date: 25 Feb 2006 12:06:12 MET NNTP-Posting-Host: eb6678ea.newsread4.arcor-online.net X-Trace: DXC=U?TUfJHhYJ4LL2:TY8[@n6:ejgIfPPld4jW\KbG]kaM88nDPh04j=Q?1KW=?7kGQP On Fri, 24 Feb 2006 15:57:46 -0600, Randy Brukardt wrote: > Indeed, many of us think that "limited" should be the default for Ada. (It > certainly ought to be for interfaces and tagged types, because that allows > more uses.) Only if you *need* assignment should something be non-limited. Right > Of course, you often do need assignment. The containers are non-limited so > that they can be composed. And that's because it doesn't make sense to have > limited elements (as the elements have to be copied into the container). I think that there should also be [limited] containers of limited types. For this we need a construction model, which would allow user-defined in-place constructors. After all Ada has always had arrays of limited components. We have to extend this model onto user-defined containers. I think that this would require separation of assignment from copy constructor, as C++ does. Though the default must be that assignment is generated from destructor and copy constructor. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de