[R6RS] `put-datum' constraints

William D Clinger will at ccs.neu.edu
Fri Aug 18 08:34:36 EDT 2006


Mike wrote:
> Should we constrain the output of `put-datum' in any way?

Yes.  The main constraint is that using get-datum to read
the output of put-datum gives you something that's equal?
to the datum whose external representation was output by
put-datum.  Another constraint is that put-datum should
satisfy the constraints placed upon number->string with
one argument.

> Possible axes:
>
> - character set used / escapes in character, string, symbol literals
> - number representation
> - abbreviations for `quote' & friends
> - whitespace
> - square brackets
>
> (I'm probably forgetting some.)
>
> My personal preference would be to constrain the character set to
> ASCII, and leave the rest up to the implementation.

IMO, that should be allowed but not required.  Some people
are very much looking forward to being able to see Unicode
characters in the mundane output from their favorite systems.

> Also, now that we require delimiters after character and boolean
> literals, should we require `put-datum' to output delimiters after
> characters and booleans?

That is already implied for characters and booleans that
occur within a larger datum, but I would prefer we not
even allow put-datum to output a space or other delimiter
at the end of its output, leaving it to the program to
output said delimiter between subsequent calls to put-datum
on the same port.

Will



More information about the R6RS mailing list