comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Access keyword
Date: Tue, 29 Apr 2008 16:32:47 -0500
Date: 2008-04-29T16:32:47-05:00	[thread overview]
Message-ID: <fv8495$du0$1@jacob-sparre.dk> (raw)
In-Reply-To: fv79c8$lik$1@registered.motzarella.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

"S�bastien" <seb.morand@gmail.com> wrote in message
news:fv79c8$lik$1@registered.motzarella.org...

> I'd like to know if there is performance issue using the access keyword?

You are actually talking about "access parameters" (the access keyword
occurs in many contexts and the answer is likely to be different in many of
them - it is best to be precise). Yes, it is generally going to be slower,
for the reasons Adam mentioned. It would be possible for a compiler to
optimize away that extra overhead, but it would probably only be practical
if all of the calls and bodies are compiled together.

For this reason and others I recommend that access parameters only be used
in cases where a conventional Ada design would be more complicated. That
almost never happens.

You often need access *types* to implement the bodies of decent
abstractions, but it is rare that they need to be exposed in the interface
in any way.

Anonymous access types (a superset of access parameters) mainly exist in Ada
to make it easier for C++ and Java programmers to move their rotten designs
to Ada. Bah humbug.

                           Randy.







  parent reply	other threads:[~2008-04-29 21:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29 13:55 Access keyword Sébastien
2008-04-29 14:35 ` Peter Hermann
2008-04-29 14:43 ` Ludovic Brenta
2008-04-29 15:16 ` stefan-lucks
2008-04-29 16:31   ` Sébastien
2008-04-29 19:55     ` Gautier
2008-04-30 14:26       ` Sébastien
2008-04-30 17:13         ` Gautier
2008-04-30 20:44         ` Ludovic Brenta
2008-04-29 17:37 ` Adam Beneschan
2008-04-29 19:08 ` Jeffrey R. Carter
2008-04-29 21:03 ` Maciej Sobczak
2008-04-29 21:32 ` Randy Brukardt [this message]
2008-04-30  4:36   ` Gautier
2008-04-30  7:15   ` Maciej Sobczak
2008-04-30  7:56     ` Dmitry A. Kazakov
2008-04-30  9:21     ` Georg Bauhaus
2008-04-30 15:16     ` Adam Beneschan
2008-04-30 15:20     ` Adam Beneschan
2008-04-30 21:32       ` Maciej Sobczak
2008-04-30 21:58         ` Adam Beneschan
2008-05-01  1:10         ` Adam Beneschan
2008-04-30 23:40       ` Randy Brukardt
2008-04-30 14:32   ` Sébastien
replies disabled

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