Re: GCC 4.0 Ada.Containers Cursor danger.
- From: "Randy Brukardt" <randy@xxxxxxxxxxxxxx>
- Date: Wed, 6 Jul 2005 18:07:38 -0500
"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> wrote in message
news:ldco4pwrxop4$.1py0a7isiagea.dlg@xxxxxxxxxxxxx
....
> "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?
We don't say, on purpose. Its is not either, it has elements of both. It
doesn't matter anyway.
>It is not clear to me what the semantics a cursor has. Is it a location in
the container?
> Then that should be an index or position.
It's not a location, and it wouldn't make sense for it to be one (other than
for a Vector). A linked list position, for instance, would require a O(N)
walk through the list. Yuck.
> Is it a pointer to an individual element? Then that should be an access
type object.
No. A raw access type could never be checked, while a Cursor can (and IMHO,
should) be checked for problems.
> Cursor looks like an amorphous mixture inheriting disadvantages of both.
We don't say exactly what it is in part because it is different for the
different containers. But you still can use the same abstraction on any
container.
Randy.
.
- Follow-Ups:
- Re: GCC 4.0 Ada.Containers Cursor danger.
- From: Dmitriy Anisimkov
- Re: GCC 4.0 Ada.Containers Cursor danger.
- From: Dmitry A. Kazakov
- Re: GCC 4.0 Ada.Containers Cursor danger.
- References:
- GCC 4.0 Ada.Containers Cursor danger.
- From: Dmitriy Anisimkov
- Re: GCC 4.0 Ada.Containers Cursor danger.
- From: Matthew Heaney
- Re: GCC 4.0 Ada.Containers Cursor danger.
- From: Dmitriy Anisimkov
- Re: GCC 4.0 Ada.Containers Cursor danger.
- From: Dmitry A. Kazakov
- Re: GCC 4.0 Ada.Containers Cursor danger.
- From: Georg Bauhaus
- Re: GCC 4.0 Ada.Containers Cursor danger.
- From: Dmitry A. Kazakov
- GCC 4.0 Ada.Containers Cursor danger.
- Prev by Date: Re: GCC 4.0 Ada.Containers Cursor danger.
- Next by Date: Re: GCC 4.0 Ada.Containers Cursor danger.
- Previous by thread: Re: GCC 4.0 Ada.Containers Cursor danger.
- Next by thread: Re: GCC 4.0 Ada.Containers Cursor danger.
- Index(es):
Relevant Pages
|