From: Robert A Duff <bobduff@TheWorld.com>
Subject: Re: Ada.Real_Time.Time_Last
Date: Sat, 18 Nov 2017 17:20:48 -0500
Date: 2017-11-18T17:20:48-05:00 [thread overview]
Message-ID: <wcch8trz0sf.fsf@TheWorld.com> (raw)
In-Reply-To: f7b1ljFtcmsU1@mid.individual.net
Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
> For various reasons, the developers of the Ada language have seen fit to
> define in the RM some standard, predefined types for which they have
> wanted to state the nature of the type, but not its full definition. For
> example, we have, in package System,
>
> subtype Any_Priority is Integer range implementation-defined;
Yes, and Any_Priority'Last is a static expression.
Would it be static in your proposal?
Programmers need to know the priority range in order to
write pragmas Priority. So in what sense is this
"private" information?
> This would enable all discrete-type operations on the Item type, but
> would hide (keep private) what sort of discrete type it is, as well as
> the names of the enumeration literals, if it is implemented as an
> enumerated type. The RM defines just such a type in Ada.Interrupts:
>
> type Interrupt_Id is implementation-defined;
>
> with the explanation (RM C.3.2(13)) "The Interrupt_Id type is an
> implementation-defined discrete type used to identify interrupts."
If Interrupt_Id is an enumeration type (not true for GNAT), you don't
want to hide the names of the interrupts from clients. If there's a
Gizmo_Device_Interrupt, then clients want to attach handlers to that by
name.
- Bob
next prev parent reply other threads:[~2017-11-18 22:20 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 ` Ada.Real_Time.Time_Last Niklas Holsti
2017-11-18 22:20 ` Robert A Duff [this message]
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