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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.etla.org!feeder.erje.net!2.us.feeder.erje.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada.Real_Time.Time_Last Date: Sat, 18 Nov 2017 17:20:48 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <591a9389-a4b8-43fa-b963-0ebb9e488be1@googlegroups.com> NNTP-Posting-Host: shell02.theworld.com Mime-Version: 1.0 Content-Type: text/plain X-Trace: pcls7.std.com 1511043648 19329 192.74.137.72 (18 Nov 2017 22:20:48 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 18 Nov 2017 22:20:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:MdyL0BvQp/Lq+6aK2AyYqiB3RJg= Xref: feeder.eternal-september.org comp.lang.ada:48998 Date: 2017-11-18T17:20:48-05:00 List-Id: Niklas Holsti 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