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!news.glorb.com!news2.arglkargh.de!noris.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: Sun, 26 Feb 2006 10:00:07 +0100 Message-ID: <1cwl2r5h594du$.1q4kglbpb2bma.dlg@40tude.net> NNTP-Posting-Date: 26 Feb 2006 09:59:58 MET NNTP-Posting-Host: 9e2248fa.newsread4.arcor-online.net X-Trace: DXC=dR=dN^V:eWWC3N6I?YBjS[:ejgIfPPldTjW\KbG]kaMXQc4L4[MA2TPQi^CWfla[nR[6LHn;2LCV^[ On Sat, 25 Feb 2006 15:05:02 GMT, Matthew Heaney wrote: > "Dmitry A. Kazakov" writes: > >> 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. > > But you can pass in an Initialize procedure as a parameter of an insertion > operation, to perform whatever initialization needs to be done. You mean "return .. do" for limited types. It is in-place, but a constructing function does not have safety of a constructor. Then you cannot ask it from the type, so it can't have a default [deduced from the type.] It is not dispatching in Insert. What about container of class-wides, i.e. when Node_Type should have ET'Class? ... and of course passing pointers to functions is ugly. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de