comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Access idiom
Date: Mon, 21 Jan 2008 02:01:12 +0100
Date: 2008-01-21T02:01:12+01:00	[thread overview]
Message-ID: <87wsq4xa93.fsf@ludovic-brenta.org> (raw)
In-Reply-To: c41f12c9-9d7d-4ddf-8cb2-458c4195a4b0@m34g2000hsb.googlegroups.com

Gene writes:
> I tentatively have given up on access dispatching entirely,
> dispatching instead on node types (not access) and copying to form
> fresh values of a named classwide access type for the return
> value(s).  This same named type is used for node child pointers.
> While this okay, there is a lot of useless copying.
>
> Feels like I'm playing whack-a-mole with the Ada type system.  What's
> the idomatic way to get this job done without the copying?

Parameters of tagged types being always passed by reference (see ARM
6.3.2(5)), there is no copying involved in "dispatching on node types"
as opposed to access, so I think your solution is fine.  Then again, I
may have misunderstood your problem.

-- 
Ludovic Brenta.



  reply	other threads:[~2008-01-21  1:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-20 19:57 Access idiom Gene
2008-01-21  1:01 ` Ludovic Brenta [this message]
2008-01-21  4:16   ` Gene
2008-01-21 15:37     ` Robert A Duff
2008-01-22  4:11     ` Randy Brukardt
2008-01-22  4:11     ` Randy Brukardt
2008-01-21  9:05 ` Dmitry A. Kazakov
2008-01-21 18:15 ` Jeffrey R. Carter
2008-01-22  3:56   ` Gene
2008-01-22  5:10     ` Gene
2008-01-22  9:01     ` Dmitry A. Kazakov
2008-01-22 18:47     ` Jeffrey R. Carter
2008-01-22  4:15   ` Randy Brukardt
2008-01-22  4:15   ` Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
2008-01-21  7:12 Grein, Christoph (Fa. ESG)
replies disabled

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