comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <alejandro@mosteo.com>
Subject: Re: Vector of Vectors.
Date: Thu, 15 Jan 2009 11:10:07 +0100
Date: 2009-01-15T11:10:07+01:00	[thread overview]
Message-ID: <6t8gc1F9ej88U1@mid.individual.net> (raw)
In-Reply-To: aqxbl.525097$yE1.73554@attbi_s21

Jeffrey R. Carter wrote:

> Peter C. Chapin wrote:
>> 
>> Surely there must be a straight forward way to do this!
> 
> I'd probably use Update_Element.

Which one could argue is straightforward from a conceptual point of view, 
but requires a lot of typing.

I think there was an old discussion about why it was not a good idea to have 
functions returning accesses to the elements for this[*], which would enable 
what Peter was attempting (since without something like C++ references 
there's no way to do this with similar code). I have done so for my use 
sometimes, but is ugly nonetheless. Exposing accesses to client code is not 
nice, to put it mildly.

[*] Dangling pointers IIRC was the reason. In GNAT case I suspect that 
dangling cursors is not any better since they don't do reference counting 
anyway.




  reply	other threads:[~2009-01-15 10:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15  0:32 Vector of Vectors Peter C. Chapin
2009-01-15  2:44 ` Jeffrey R. Carter
2009-01-15 10:10   ` Alex R. Mosteo [this message]
2009-01-15 10:56     ` Georg Bauhaus
2009-01-15 20:44     ` Jeffrey R. Carter
2009-01-15 21:26       ` Robert A Duff
2009-01-17 10:20         ` Ivan Levashew
2009-01-17 10:51           ` Dmitry A. Kazakov
2009-01-17 16:45             ` Robert A Duff
2009-01-17 17:18               ` Dmitry A. Kazakov
2009-01-17 23:06                 ` Robert A Duff
2009-01-18  9:44                   ` Dmitry A. Kazakov
2009-01-17 16:41           ` Robert A Duff
2009-01-17 18:56             ` Georg Bauhaus
2009-01-17 22:59               ` Robert A Duff
2009-01-18 18:34                 ` Georg Bauhaus
2009-01-18 21:29                   ` Robert A Duff
2009-01-19 11:52                     ` Georg Bauhaus
2009-01-19 12:39                       ` Georg Bauhaus
2009-01-20  2:11                     ` Randy Brukardt
2009-01-15 12:08   ` Peter C. Chapin
2009-01-16 10:15     ` Alex R. Mosteo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox