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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.172.6 with SMTP id v6mr10183154ioe.38.1506964789417; Mon, 02 Oct 2017 10:19:49 -0700 (PDT) X-Received: by 10.157.13.131 with SMTP id 3mr223499ots.20.1506964789366; Mon, 02 Oct 2017 10:19:49 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!v62no2776656itd.0!news-out.google.com!194ni4268itf.0!nntp.google.com!v62no2780050itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 2 Oct 2017 10:19:49 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.167.212.61; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 85.167.212.61 References: <325cf1db-bd9e-4f58-a07b-f297960df269@googlegroups.com> <457e2526-d4b6-4999-8521-64f8b6a0810f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2bc7aef0-c3d6-45e1-9a45-e8bdeafcf572@googlegroups.com> Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language From: reinert Injection-Date: Mon, 02 Oct 2017 17:19:49 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2959 X-Received-Body-CRC: 3378638199 Xref: news.eternal-september.org comp.lang.ada:48279 Date: 2017-10-02T10:19:49-07:00 List-Id: On Monday, October 2, 2017 at 6:38:07 PM UTC+2, Dmitry A. Kazakov wrote: > On 2017-10-02 18:23, reinert wrote: > > On Monday, October 2, 2017 at 5:02:16 PM UTC+2, G.B. wrote: > > ...... > >> > >> 14. if Clock in t1 .. t2 then -- this dows *not* function > >> | > >> >>> scalar type required for range > >> > >> This does not work because Time is not a scalar type, even though > >> time per se, if measured in seconds, say, can make one think it is > >> of a scalar type. But type Time is private, in Ada, an abstract > >> point in time, not a number of time units. > > > > I thought "x in a..b" was (should be?) short for "a <= x and x <= b" > > (where x, a and b are elements in a (strict) linearly ordered set or so). > > Yes, but there is no Time interval type defined in Ada, alas. t1..t2 is > an expression resulting in an interval. > > The right way, considering that Clock is not constant, is: > > Clock - t1 in 0..t2 - t1 then > > or, considering implied semantics, simply > > if Clock <= Deadline then > > or > > if Clock - Started_At <= Timeout then > > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de OK, but conceptually, putting technicality aside, for any two time points, t1 and t2, a third time, t, is such that t1 <= t <= t2 or not. This is (logically) well defined. "t1 <= t <= t2" is in mathematical contexts often written "t \in [t1,t2]" where [t1,t2] is thought about as a time interval. It is not a good idea to have a concept of "time intervals" in Ada? This may though not be a large question :-) reinert