TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
AdaWorks <[log in to unmask]>
Reply To:
Date:
Thu, 4 Feb 1999 18:22:19 -0800
Content-Type:
TEXT/PLAIN
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