TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To: Mike Brenner <[log in to unmask]>
Date: Thu, 4 Feb 1999 18:22:19 -0800
Reply-To: AdaWorks <[log in to unmask]>
From: AdaWorks <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: TEXT/PLAIN; charset=US-ASCII
MIME-Version: 1.0
Parts/Attachments: TEXT/PLAIN (23 lines)
On Thu, 4 Feb 1999, Mike Brenner wrote:

> Rich > ... The more object-oriented way is to export a function
>      > ... in place of the deferred constant
>
> The weak point of this is the inability to have static constants
> that are constructed from initializers requiring that function.
>
> Sometimes having a static constant is a performance advantage.

  Mike,

  You are correct for the case of a declared static constant in the
  declarative part of a subprogram.  I am referring to the deferred
  constant one sometimes exports from the public part of a package,
  rather than one declared locally to a subprogram.

  Of course the function would be in-lined, but that does not solve the
  issu you are citing. I agree that statically declared constants can
  be more efficient.

  Richard

ATOM RSS1 RSS2