David Rush scripsit: > A brief forward on character sets is necessary. I don't think Thing1 > should say *anything* other than that chars exist and may not be > isomorphic to the set of exact whole numbers less than 255. All the > Unicode magic can easily be in Thing2.
As you know, I think we need a bit more than that: guarantees that (a) the mapping between characters and integers uses Unicode codepoints on the integer side, and (b) case conversion goes by Unicode rules. But that's it. > ; and here's the kicker, where the semantics are a little funky > (string->datum string k-success k-more k-error) ;=> datum > > for each call to string->datum, exactly one of k-success, k-more or > k-error is called depending on the state of the parse. The > kontinuation functions will be called as follows: > > (k-success datum remaining-string) > (k-more parser-continuation) > (k-error error-symbol error-continuation parsed-string remaining-string) > > The parser-continuation function has the same signature as > string->datum, but it may be (and probably is!) a closure captured > from within the original parse. The error-continuation function allows > the programmer to recover from deviations in parsing a standard datum > by inserting a datum into the current parse and restarting it with the > following signature: > > (error-continuation datum string k-success k-more k-error) ;=> datum > > This gives us char encoding independence in the standard IO, run-time > extensibility for reading new data types, and useful binary I/O. I > think it's a win and *way* less complicated than most other IO > proposals (some of which I have propagated over the years) It certainly is interesting and clever, but (since you just made it up, and it is not analogous to anything existing) unfit IMNSHO for standardization, which should be fundamentally a conservative activity. > david > -- > GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt > > _______________________________________________ > r6rs-discuss mailing list > [email protected] > http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss -- There is / One art John Cowan <[email protected]> No more / No less http://www.ccil.org/~cowan To do / All things With art- / Lessness --Piet Hein _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
