2009/9/29 John Cowan <[email protected]>:
> David Rush scripsit:
>> ; and here's the kicker, where the semantics are a little funky
>> (string->datum string k-success k-more k-error) ;=> datum
>>
> It certainly is interesting and clever, but (since you just made it
> up, and it is not analogous to anything existing)

Ah, but in fact, it *is* highly related to R4RS IO. R4RS READ is
almost trivially implementable using the API I specified. R4RS WRITE
is similarly simple given adequate coverage of type->string functions.
And because of the kontinuation interface on string->datum you get
robust error recovery from malformed data streams for free while still
having all the convenience of READ.

> unfit for standardization, which should be fundamentally a conservative 
> activity.

Indeed. But I consider this a classic example of the Clingerism
(which, since it is tantamount to Godwin's law for Scheme language
discussions, I will not quote herein :). By refactoring I/O I believe
we will have a simpler, more robust interface that trivially
implements pre-existing semantics. Sure we can have READ if you feel
you need it, but READ's behavior should be defined in terms of the
primitives I outlined.

david
-- 
And I did call it "inflammatory" I/O :)

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to