On Fri, Jan 11, 2013 at 8:13 PM, Asumu Takikawa <as...@ccs.neu.edu> wrote:
> On 2013-01-11 15:39:08 -0600, Robby Findler wrote: > > 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. > > I wrote a patch to make both of these use the same structure, attached > to the e-mail. It seems to pass all of the srfi-19 and date tests (with > some tests changed where appropriate). Does it look alright? > > (The diff shows all of the tests changing). Are the tests for exported functions? If so, that sound bad. > It turns out there was one (sort of) good reason for SRFI-19 to define > its own struct type: it used mutation for several functions. Racket's > date/date* are immutable. I just changed these to use functional update. > > Was the mutation exposed via the library? > Another thing: when a string is converted to a date, it's possible that > the format string only has time-of-day but no date specification. > Previously, this produced a srfi/19 date with '#t's but I've now > defaulted it to the start day of the Unix epoch (arbitrarily). > > That sounds like a backwards incompatible change (in that some programs that could use srfi/19 would get #f out of selectors that now get something else). Could a srfi/19 date be a union of two structs, where one represented a time only? Robby
_________________________ Racket Developers list: http://lists.racket-lang.org/dev