Re: GCC 4.0 Ada.Containers Cursor danger.



On Wed, 06 Jul 2005 09:50:05 +0200, Georg Bauhaus wrote:

> Dmitry A. Kazakov wrote:
>> On 5 Jul 2005 10:11:10 -0700, Dmitriy Anisimkov wrote:
>>
>>>I would propose to have a Ada.Containers subset without cursors for
>>>safety reasons.
>>
>> Yes, or even to remove them completely.
>>
>> It is not clear to me what the semantics a cursor has.
>
> Then it's best to have a look at AI302 or the new standard,
> and learn what semantics a cursor has, before suggesting
> their removal.
>
> What's the translation of "Was der Bauer nicht kennt,
> das frisst er nicht?"

"All of the containers specify positions using a cursor,
which is similar to an access type in that it designates an element."

So? Is it position or access?

"Each container includes a cursor, which is a reference to an element
within a container. Cursors generally remain valid as long as the container
exists and the element referenced is not deleted."

Here it drifts to: a pointer to some element in the container. And what
does it mean to "generally remain valid"? What could a particularly
*invalid* cursor be?

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.



Relevant Pages

  • Re: Decouple SQL queries from class in OOP design
    ... > Dmitry A. Kazakov wrote: ... >> Not only the cursor but DB as a whole is a subject of abstraction. ... > as Prolog, and much more sucessful than Prolog. ...
    (comp.object)
  • Re: Ada.Containers.Indefinite_Ordered_Maps of gcc 4.0.1 has bug ?
    ... Empty_Map: constant Map; ... No_Element: constant Cursor; ... function Length (Container: Map) return Count_Type; ... pragma Inline; ...
    (comp.lang.ada)
  • Re: Run-time accessibility checks
    ... No I made it having same interface, ... container, *because* it is of a different type. ... The cursor is the index in the model you have here. ... to be used to achieve the goal, and secondly return by reference is marked ...
    (comp.lang.ada)
  • Re: Hierarchy Problems
    ... a cursor but it is fast enough. ... SELECT ident, parent, @lvl ... -- get all container rows into a temporary table ... >> You probably get a table scan when you look for the ancestors using the ...
    (microsoft.public.sqlserver.programming)
  • Re: Run-time accessibility checks (was: Construction initialization problem)
    ... container, *because* it is of a different type. ... abstraction, I think you have to go to a fully dynamic language (which Ada ... How to prevent update when a cursor is ... As far as a concurrent environment goes, ...
    (comp.lang.ada)