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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f2690a5e963b61b6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail From: "Dmitriy Anisimkov" Newsgroups: comp.lang.ada Subject: Re: GCC 4.0 Ada.Containers Cursor danger. Date: 16 Jul 2005 20:55:15 -0700 Organization: http://groups.google.com Message-ID: <1121572515.355276.292180@o13g2000cwo.googlegroups.com> References: <1120583470.429264.325450@g43g2000cwa.googlegroups.com> <1120639461.224146.235430@g44g2000cwa.googlegroups.com> <1120642489.101644.74190@o13g2000cwo.googlegroups.com> <1120643138.031761.212450@g43g2000cwa.googlegroups.com> <42cbb52c$0$10807$9b4e6d93@newsread4.arcor-online.net> <1120666922.733581.179180@g47g2000cwa.googlegroups.com> <42cc1f0f$0$10808$9b4e6d93@newsread4.arcor-online.net> <1120739383.801736.224270@o13g2000cwo.googlegroups.com> <42cd343b$0$22784$9b4e6d93@newsread2.arcor-online.net> <1120759007.967336.187840@g47g2000cwa.googlegroups.com> <42cda8db$0$22780$9b4e6d93@newsread2.arcor-online.net> <1121450624.207988.262710@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: 195.162.49.9 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1121572520 23900 127.0.0.1 (17 Jul 2005 03:55:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 17 Jul 2005 03:55:20 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: o13g2000cwo.googlegroups.com; posting-host=195.162.49.9; posting-account=t4CEmgwAAAA8dL2naG2k3iz_rN__dZy3 Xref: g2news1.google.com comp.lang.ada:3642 Date: 2005-07-16T20:55:15-07:00 List-Id: <> It is *Address* arithmetic, not pointer. Address could be trasformet into access only via System.Address_To_Access_Conversions and ----RM--------------- The To_Pointer and To_Address subprograms convert back and forth between values of types Object_Pointer and Address. To_Pointer(X'Address) is equal to X'Unchecked_Access for any X that allows Unchecked_Access. ------------------ So, we have "Unchecked_". Pointer arithmetic in Ada. If the name of the Cusrosrs would be Unchecked_Cursor, and there is in Ada.Containers would be complete set of access routines without cursors, it would be Ok. <> Yes, I'm late, but I guess not only me do not like such unsafety. (or checking the cursors gotten from machine model unsafety.) Maybe we should review Ada.Containers interface. The implementation is good, but we should have a safer interface i think. <> I think high level interfaces should not be based on machine model in Ada. It is good for C, but not good for Ada. Ada have an access to machine model, but it is all in Unchecked and system representation parts. Machine model is isolated from safety programming in Ada. <> <> If there is a cursor, it should be checked for sure, not only with turned on assert checking. But I prefer to work without cursors, so I need the complete set of access routines without such checking cursors. Every time you say "if you need, do it." i could, but i could guess from this thread that not only me have a vision of containers library interface without cursors.