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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fa18fb47ddd229a7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-11 04:36:09 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!skynet.be!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "amado.alves" Newsgroups: comp.lang.ada Subject: RE: Proposed change to BC iterator parameters Date: Thu, 11 Dec 2003 12:33:20 -0000 Organization: Cuivre, Argent, Or Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1071146012 24060 80.67.180.195 (11 Dec 2003 12:33:32 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Thu, 11 Dec 2003 12:33:32 +0000 (UTC) To: Return-Path: X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message Thread-Topic: Proposed change to BC iterator parameters Thread-Index: AcO/X/DeHAr4D3x+S76kCUKnE0I0jAAgiUFv X-OriginalArrivalTime: 11 Dec 2003 12:33:20.0732 (UTC) FILETIME=[F60199C0:01C3BFE2] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:3354 Date: 2003-12-11T12:33:20+00:00 << > indefinite formals, but I pass well without limited ones. Most limited > formals I've seen in libraries are accompanied by a formal assignment > operation or some such, which prety much defeats the purpose of their > (formal) limitedness, i.e. their logic is in clash with their = definition. Well there is one exception here. It's File_Type. I can see the need to write a container to a file with the help of an iterator. Here limited might help. Remember: we talk about an extra parameter to the iterator and not about = the data stored inside the container.>> That's two *separate* issues. Passing a file parameter to an iterator: procedure Iterate_With_File (F : File_Type) is procedure Apply (Item : Iterator) is begin Op (F, Item); end; procedure A_Visit is new Visit (Apply); begin A_Visit; end; Now, a container of files. With a container library that does not accept = limited element types. You know, every problem can be solved with yet = another level of indirection: type File_Ptr is access all File_Type; package My_Container is new Container (File_Ptr);