Re: SRFI-19 reference implementation problem
Martin Gasbichler 25 Feb 2003 09:40 UTC
>>>>> "Will" == Will Fitzgerald <xxxxxx@ameritech.net.no.spam.please> writes:
Will> OK, A new version of the SRFI-19 implementation is available at:
Will> http://max.cs.kzoo.edu/~wfitzg/srfi-19/
Will> You'll find the code and a small test suite there.
Will> Please let me know of any errors.
Thanks for taking care of this!
Some small remarks I came across while porting this to scsh:
Why not using SRFI-9 for the definition of the record types? This
would it also make possible omit the definition of mutators completely
instead of redefining them to throw an error.
Why is the definition of COPY-TIME not simply:
(define (copy-time time)
(make-time (time-type time)
(time-second time)
(time-nanosecond time)))
/ with more than two arguments is an optional procedure in R5RS, same
applies to -. IMHO using the binary variants makes the code much more
readable...
Scsh's reader is case-sensitive, it therefore fails to understand
#\Space. Also #\Tab or #\tab is not in R5RS, maybe you could use a
string containing a tabulator character instead (for the scsh port I
used scsh's ASCII package).
The scsh version of your code with these things fixed is available
from scsh's CVS at
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/scsh/scsh-0.6/scheme/srfi/srfi-19.scm?rev=HEAD&content-type=text/plain
Before successfully running the test suite I had to fix two minor
tweaks:
In the test suite you use the non-standard |...| notation for
symbols.
Also in the test suite you use tm:nano which is obviously an internal
constant of the library.
--
Martin