RE: OT: Re: Less is more
"Victor Engmark" <[email protected]> Mon, 3 May 2004 16:04:45 +0200
| Newsgroups | gmane.mail.ng |
|---|---|
| Message-ID | <[email protected]> |
> -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Arnt Gulbrandsen > Sent: Monday, May 03, 2004 3:09 PM > To: mail-ng mailinglist mailinglist > Subject: Re: OT: Re: Less is more > > > Keith Moore writes: > > But if you look at the kinds of malformed dates that are out there, > > most are not malformed because the programmer tried to use > some legal > > variant of the date syntax and failed to get it right - they're > > malformed because the programmer failed to even try to get it right. > > True. But IMO, if the syntax were simple, strict and > understandable to the average programmer, this probably > wouldn't happen. Despite being in danger of getting even more OT, I believe the following is an important issue: To a certain extent, what you write is true. But I believe an almost arbitrarily complex standard could be implemented correctly by providing developers with relevant examples, test cases, pseudo-code and reference libraries: - Examples of (extra-)ordinary datetimes and the correct result of extracting e.g. the week number and converting between standards - Examples of invalid datetimes and ways to handle them - OS specific issues - Programming language specific issues - Calendar conversion - Reference libraries thoroughly tested for standard compliance (if programmers won't have to re-invent the wheel, I believe they will be much more inclined to get things right). Maybe I'm talking out of my a** right now, but it seems to me every standard I've looked a bit into only provides rather shallow examples, often not even close to what I want to accomplish. A formal definition gives me nothing if all I want is to get this thing over with, in the least possible time, with the least possible amount of bugs (in the sense of code causing crashes or security holes, not date errors). This should probably not be part of the standard itself, but put in an appendix or referenced web site which can handle the dynamic nature of The Real World(TM). Just another two cents. -- Victor