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-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 02 Mar 2011 19:44:59 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <31c357bd-c8dc-4583-a454-86d9c579e5f4@m13g2000yqb.googlegroups.com> <05a3673e-fb97-449c-94ed-1139eb085c32@x1g2000yqb.googlegroups.com> <4d4c232a$0$28967$882e7ee2@usenet-news.net> <4D4D6506.50909@obry.net> <4d50095f$0$22393$882e7ee2@usenet-news.net> <4d6d56c4$0$11509$882e7ee2@usenet-news.net> <16u9ka51wbukr$.1fj2sb73j9rv6.dlg@40tude.net> <4d6d627b$0$11509$882e7ee2@usenet-news.net> <29c4lixc0ght$.14kkfz1kij135.dlg@40tude.net> <4d6d6afb$0$11509$882e7ee2@usenet-news.net> <1gz9984wwizn5.r619fw4z9o56.dlg@40tude.net> <4d6e5614$0$21954$882e7ee2@usenet-news.net> <4d6e64f5$0$21954$882e7ee2@usenet-news.net> <4d6e6f79$0$7657$9b4e6d93@newsspool1.arcor-online.net> <4d6e7313$0$21956$882e7ee2@usenet-news.net> In-Reply-To: <4d6e7313$0$21956$882e7ee2@usenet-news.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4d6e902b$0$6760$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 02 Mar 2011 19:45:00 CET NNTP-Posting-Host: d9e39a8c.newsspool3.arcor-online.net X-Trace: DXC=87c@:Lh>_cHTX3j=HanV[VBdXT> X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:18709 Date: 2011-03-02T19:45:00+01:00 List-Id: On 02.03.11 17:40, Hyman Rosen wrote: > On 3/2/2011 11:25 AM, Georg Bauhaus wrote: >> A good (Ada) interface might try to provide a structured calendar >> date type. I doubt that such an interface will make the practical >> programmer happy. > > Why in the world not? I was told that today's programmers have grown accustomed to handling calendar dates as strings. Briefly. That they expect to be able to pass these strings to calendar date handling libraries and back. As strings. And then just output whatever the library computes. Anything like Ada.Calendar is too bothersome, as important things should be done with ease, with little writing, handled by good libraries. The good interface to the complexities of properly dealing with time and date would be - Pass a date string (that is automagically parsed by the library) - Say add_days(2) - Get the resulting date string The permitted level of noise in date and time computations would be something like date_string = DOM_document.getElementById("date_of_birth").text() if Calendar.get_month(date_string) = Calendar.current_month() then ... > Also, I find it difficult to envision the circumstances under which > a program must deal with all the possible ways in which a date can > be written as a string, so the leniency or peculiarity of MySQL ought > not to cause practical difficulties. The difficulty is the silent bugs introduced when some subsystem of a program produces "legacy calendar date" strings. They tend to be of some non-standard form, one that is not compatible with MySQL's expectations, but that MySQL does not reject. You might then notice the effects when it is too late.