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,6c43f45c2ab47c51 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Using Ada.Containers.Vector and Limited Private types Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <8ff4c6c2-9892-463e-bdfd-1f7bfd78d607@s50g2000hsb.googlegroups.com> <3eff8efe-476b-4b78-affe-8c90a445771b@l64g2000hse.googlegroups.com> Date: Mon, 7 Jul 2008 16:15:11 +0200 Message-ID: <2xxm233rrrdz.1dbgcudoqtmye.dlg@40tude.net> NNTP-Posting-Date: 07 Jul 2008 16:15:11 CEST NNTP-Posting-Host: b3178f6f.newsspool2.arcor-online.net X-Trace: DXC=j0F^m`;lFKg;iVb[J9ZZP`A9EHlD;3Ycb4Fo<]lROoRa8kFo0I^U=HCfnKm X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:1031 Date: 2008-07-07T16:15:11+02:00 List-Id: On Mon, 7 Jul 2008 06:29:16 -0700 (PDT), Gene wrote: > On Jul 6, 3:18�pm, "Dmitry A. Kazakov" > wrote: >> I think it is not a good idea to have collections of Directory_Entry_Type. >> Depending on the implementation, Directory_Entry_Type might use some system >> resources, locked until Directory_Entry_Type finalization. > > Really? I can easily see why the "Search" structure would contain a > handle or lock, but it's hard to see why a directory entry would do > so. For example, in order to get a notification when the target gets changed (or removed), or else in order to prevent such changes. At least the choice to make Directory_Entry_Type limited indicates that it is not just a "value." > At any rate, the GNAT implementation doesn't. Well, writing GNAT-specific programs is not a good idea either. Anyways, if the collection were intended to contain directory item names, then it would be better and cleaner to design it in just this way. Ada.Container.Indefinite_Ordered_Maps : String -> File_Kind or a similar collection would perfectly do the job. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de