<div dir="ltr">I think it would be great if you were to find backwards-compatible ways to bring these two a little bit closer. Making them use the same internal date struct, for example, would be a great thing.<div><br></div>
<div style>And as you probably guessed, racket/date is the way it is for backwards compatibility reasons. I don't know how srfi/19 came to be, but it might just be because someone took the sample implementation from the srfi and stuck it into Racket.</div>
<div style><br></div><div style>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 11, 2013 at 12:04 PM, Asumu Takikawa <span dir="ltr"><<a href="mailto:asumu@ccs.neu.edu" target="_blank">asumu@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I had a few design questions about date types as used in the racket/date<br>
and srfi/19 libraries.<br>
<br>
First, for some reason racket/date and srfi/19 use mutually incompatible<br>
date representations and this is noted in the documentation (so it's<br>
intentional). Is there a good reason for this? As far as I can tell, it<br>
should be technically do-able to make srfi/19 use `date*` (for<br>
nanoseconds) and thus be compatible with racket/date functions.<br>
<br>
Second, the date structure used by racket/date has some seemingly<br>
extraneous fields. For example, `week-day` and `year-day` can be<br>
calculated from the rest of the fields and aren't necessary (this is<br>
annoying if you want to construct your own dates manually).<br>
<br>
Changing the structure is clearly a non-solution, but how about<br>
exporting a different `make-date` constructor that makes `week-day`,<br>
`year-day`, `dst?`, and `time-zone-offset` optional and default to<br>
something sensible?<br>
<br>
Note: in the long run, it's probably best to have a comprehensive<br>
srfi/19 replacement in racket/date, but in the meantime it'd be nice to<br>
have a stopgap measure.<br>
<br>
Cheers,<br>
Asumu<br>
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
</blockquote></div><br></div>