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,f89c9977a6e4ceda X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-08 13:35:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Missing in Booch: range operations Date: 8 Nov 2002 13:35:42 -0800 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0211081335.6b2ac730@posting.google.com> References: <3dcb8eec$0$307$bed64819@news.gradwell.net> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1036791342 11656 127.0.0.1 (8 Nov 2002 21:35:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 8 Nov 2002 21:35:42 GMT Xref: archiver1.google.com comp.lang.ada:30616 Date: 2002-11-08T21:35:42+00:00 List-Id: porton@ex-code.com (Victor Porton) wrote in message news:<3dcb8eec$0$307$bed64819@news.gradwell.net>... > > BTW, these should throw an exception if the begin and the end of the > range are from different containers. Here's an analogy. Suppose we have this: type T1 is access Integer; for T1'Storage_Pool use P1; type T2 is access Integer; for T2'Storage_Pool use P2; function Free2 is new Unchecked_Deallocation (Integer, T2); and now we do this: declare O1 : T1 := new Integer; O2 : T2 := T2 (O1); begin Free2 (O2); end; Here, we allocate an object from the storage pool (P1) associated with access type T1, but we deallocate that some object to the storage pool (P2) associated with access type T2. What should happen? If your answer is "The behavior isn't defined by the language, therefore you shouldn't do it.", then that same argument should apply to iterator types (which are simply access types in disguise).