From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,988f2c34ce3e6595 X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) Subject: Re: Modest proposal, 2 of 3 Date: 1996/11/28 Message-ID: <57ivs0$hr6$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 201171280 references: <575ag6$rt6@netline-fddi.jpl.nasa.gov> <3299FA03.5A1D@watson.ibm.com> organization: Comp Sci, RMIT, Melbourne, Australia nntp-posting-user: ok newsgroups: comp.lang.ada Date: 1996-11-28T00:00:00+00:00 List-Id: >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.