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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-15 03:41:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!server3.netnews.ja.net!newshost.central.susx.ac.uk!news.bton.ac.uk!not-for-mail From: John English Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational Date: Wed, 15 May 2002 11:38:39 +0100 Organization: University of Brighton Message-ID: <3CE23AAF.AA6B219E@brighton.ac.uk> References: <3CD88FBD.4070706@telepath.com> <3CD91E31.1060004@telepath.com> <3CD94E63.3050607@mail.com> <4519e058.0205090554.1e58d951@posting.google.com> <3CE12758.18E3EC32@brighton.ac.uk> NNTP-Posting-Host: straumli.it.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 1021459162 15951 193.62.183.204 (15 May 2002 10:39:22 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 15 May 2002 10:39:22 GMT X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:24083 Date: 2002-05-15T10:39:22+00:00 List-Id: "Dmitry A. Kazakov" wrote: > > On Tue, 14 May 2002 16:03:52 +0100, John English > wrote: > > >"Dmitry A. Kazakov" wrote: > >> > >> Talking about next revisions and default values, there is another > >> problem with them. How to make a default value private? Let I have > >> some value declared in the private part and I don't want to expose it > >> in the public part. Then there will be no way to use it as a default > >> value in any public thing. > > > >Can't you use a deferred constant for your default value? > > It will be visible then! I want not only hide the implementation, but > the very fact that such object exists. Let I have a type with some > reserved values which no user-declared variable or parameter may have. > Like "null" for pointers. Yet some subroutines could have these secret > values as defaults for some parameters. A simple work-around is just > to make several overloaded subroutines from them, which is clumsy. Hmm, if I understand what you're saying, you don't want people to know there is a default at all (i.e. you don't want to mention it in the visible spec). What is really wrong with something like: type Magic_Type is private; Default_Value : constant Magic_Type; procedure Foo (Magic : Magic_Type := Default_Value); which tells you that the parameter can be omitted because there's a default, but you have no idea what the default actually is? ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------