From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Ada.Real_Time.Time_Last
Date: Sat, 18 Nov 2017 19:31:37 +0200
Date: 2017-11-18T19:31:37+02:00 [thread overview]
Message-ID: <f7b93qFlaaU1@mid.individual.net> (raw)
In-Reply-To: <ouplg5$lnq$1@gioia.aioe.org>
On 17-11-18 18:01 , Dmitry A. Kazakov wrote:
> On 2017-11-18 16:24, Niklas Holsti wrote:
>
>> Making Count'First and Count'Last available is part of the goal of the
>> extension, but the point is that the *expressions* that define their
>> values would still be *private*, which means that the user of the type
>> cannot (or is not meant to) depend on those expressions. The user can
>> access the end result ('First, 'Last) but is not meant to depend on
>> any other properties of those expressions.
>
> The proposal should also encompass other cases where information hiding
> principle gets violated, e.g.:
>
> procedure Foo (I : Integer := 20);
>
> If I don't want to expose the default or when the parameter is a private
> type, I should be able to provide a private value, just like in your case:
>
> type Count is range 0..<private-value>;
>
> Same applies to the defaults of record type members, BTW.
Those privacy needs can already be handled by defining the relevant
values as deferred constants (perhaps modulo some freezing-point
concerns). Of course this method means that the private constant must be
given a name; that name may or may not be useful, depending on the case.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2017-11-18 17:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 14:28 Ada.Real_Time.Time_Last Simon Wright
2017-11-15 20:03 ` Ada.Real_Time.Time_Last Niklas Holsti
2017-11-17 9:20 ` Ada.Real_Time.Time_Last Simon Wright
2017-11-17 21:39 ` Ada.Real_Time.Time_Last Niklas Holsti
2017-11-18 13:06 ` Ada.Real_Time.Time_Last AdaMagica
2017-11-18 13:18 ` Ada.Real_Time.Time_Last Niklas Holsti
2017-11-18 14:00 ` Ada.Real_Time.Time_Last AdaMagica
2017-11-18 14:15 ` Ada.Real_Time.Time_Last Jeffrey R. Carter
2017-11-18 15:24 ` Ada.Real_Time.Time_Last Niklas Holsti
2017-11-18 16:01 ` Ada.Real_Time.Time_Last Dmitry A. Kazakov
2017-11-18 17:31 ` Niklas Holsti [this message]
2017-11-18 22:20 ` Ada.Real_Time.Time_Last Robert A Duff
2017-11-19 10:50 ` Ada.Real_Time.Time_Last Niklas Holsti
2017-11-20 5:57 ` Ada.Real_Time.Time_Last J-P. Rosen
2019-01-29 22:03 ` Ada.Real_Time.Time_Last Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox