[r6rs-discuss] [Formal] Have put-datum append atmosphere

From: John Cowan <cowan>
Date: Thu, 14 Jun 2007 13:20:40 -0400

Alan Watson scripsit:

> My suggestion "that put-datum behave in such a way that the data written
> by two consecutive calls to put-datum can always be read by two
> consecutive calls to get-datum" is more complex, but not hugely so.
> Unless I am mistaken, I think the editors are giving undue weight to the
> small additional complexity.

There are at least two problems with the R5.94RS note on put-datum:
First, it says "care must be taken", but doesn't say who is to take care,
the programmer or the implementation. Since "no trailing delimiters"
are to be written, the implementation might "take care" by writing
out a leading count of characters, or the programmer might "take care"
by writing out -- what?

That leads to the second problem: the output is said to be implementation-
dependent, though presumably it is intended to be compatible with
what get-datum accepts (though that is not said either). A plausible
implementation, therefore, would be to write out a hex or base-64 dump of
the internal representation. (If you want "read" and "write", you know
where to find them.) What should the programmer write out to delimit
the data? Only the implementation of get-datum knows for sure.

-- 
John Cowan    cowan at ccil.org    http://ccil.org/~cowan
Half the lies they tell about me are true.
        -- Tallulah Bankhead, American actress
Received on Thu Jun 14 2007 - 13:20:40 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC