From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Subject: Re: Modest proposal, 2 of 3
Date: 1996/11/28
Date: 1996-11-28T00:00:00+00:00 [thread overview]
Message-ID: <57ivs0$hr6$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: 3299FA03.5A1D@watson.ibm.com
>Van Snyder wrote:
> PROPOSAL for next standardization of Ada
>
> Allow objects to be declared in the public part of a package
> specification with mode "out". The meaning is that clients of the
> package can reference the variable, but can't store into it.
I note that exporting a function instead has a big advantage:
functions are overloaded, variables aren't. This is only an
issue to people who use 'use', of course.
I note another benefit of using access functions instead, which
is that if you wonder whether the "variable" actually _is_ being
used outside the package, you can compile for debugging and put
a breakpoint on it, or you can use a profiler like gprof.
A cross-reference would show you _static_ = potential uses only,
a debugger or profiler can show you _actual_ uses. There's no
reason why profilers _couldn't_ could variable accesses, but none
that I have seen actually does so.
--
Fear most of all to be in error. -- Kierkegaard, quoting Socrates.
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.
next prev parent reply other threads:[~1996-11-28 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-22 0:00 Modest proposal, 2 of 3 Van Snyder
1996-11-23 0:00 ` Robert Dewar
1996-11-25 0:00 ` Norman H. Cohen
1996-11-26 0:00 ` Ken Garlington
1996-11-28 0:00 ` Richard A. O'Keefe [this message]
1996-11-26 0:00 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox