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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a644fa9cd1a3869a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-10 03:13:41 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!howland.erols.net!blackbush.xlink.net!blackbush.de.kpnqwest.net!newsfeed.vmunix.org!newsfeed2.easynews.net!easynews.net!news.cid.net!news.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.2 Date: Sat, 10 Nov 2001 12:14:47 +0100 Organization: Enyo's not your organization Message-ID: <87668ivpw8.fsf@deneb.enyo.de> References: <3BECA3B7.5020702@telepath.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cancel-Lock: sha1:0ZEeoY1fD2vU286Ed1+WlTpzMfk= Xref: archiver1.google.com comp.lang.ada:16208 Date: 2001-11-10T12:14:47+01:00 List-Id: -- Ideally these routines would verify that Location was issued -- for the Subject list and is still valid, but that would be -- tough to enforce. Better to call such misuse a "bounded error", -- or somesuch. You should not call it a "bounded error" because that would be confusing. Such errors result in erroneous execution with typical implementations. For debugging, we might add an additional variable parameter to the generic, which can be used to enable debugging. It should default to "no debugging", and in such cases, at least GNAT generates no code for "if Debugging then ... end if;" conditional statements. Regarding the the name of "Index", I would like to reserve this word for discrete types. "Location" or "Position", as proposed by Jeffrey, is probably better. What about terminating Iterator prematurely using an exception? It's a bit ugly, granted, but with the "out" parameter approach, I've managed to forget to set the parameter more than once. If the Quit parameter is going to stay, we shouldn't use a Boolean type for it, but a new enumeration type.