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,a3358f1ef9d04e63 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-19 06:46:10 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!uunet!dca.uu.net!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Calendar - leap seconds Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Mon, 19 Mar 2001 14:43:42 GMT References: <9940d5$49u6d$1@ID-25716.news.dfncis.de> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:5841 Date: 2001-03-19T14:43:42+00:00 List-Id: "Nick Roberts" writes: > I'm going to upset people here :-/ but Ada.Calendar should never have dealt > with the extremely thorny issue of converting continuous absolute time to > and from a calendrical system such as Gregorian (or whatever you want to > call it). It should have been called Ada.Time_Functions and simply had two > functions such as To_MJD(:Time) and To_Time(:MJD).* > > There could then have been an optional package > Ada.Text_IO.Gregorian_Calendar, as well as perhaps > Ada.Text_IO.Time_Within_Day (for hours minutes and seconds), etc. I'm not sure why moving some of the functionality to a Gregorian_Calendar package would "upset" anyone. It seems like a fairly minor change. I do think it's a mistake to have the Clock function in the same package as all those conversion functions. Clock is doing I/O, and shouldn't be mixed with the rest (the rest being "pure" code). I see the same mistake in Text_IO -- it mixes formatting with I/O. I find it annoying, for example, that if I want decimal-formatted integer, I can use 'Image, but if I want hexdecimal, I have to import Text_IO (or write my own). Hexadecimal formatting has nothing directly to do with I/O of character strings! - Bob