I said: > > The ONLY procedure that throws an exception is "read-error": > > (define (read-error message)
On Tue, 26 Nov 2013 15:11:39 +0100, "Jörg F. Wittenberger" wrote: > I changed it's signature to match srfi-23 (for know) > > (: read-error (string &rest * -> *) Okay, but you'll need to modify the procedure definition to match. > But I tend to prefer a more restrictive, though compatible, syntax in > this case > > (: read-error (string input-port string &rest * -> *) Please don't. The intent was to be syntactically consistent with "error" as defined in srfi-23 and R7RS. Someone can always modify the error port to change where it goes. Oh, I presume you mean "output-port" not "input-port" there. > Whereby I'd require all calls to read-error to pass the port and the > last successfully read token in an effort to further improve error messages. Why not just pass "last successfully read token" as a parameter after the string? > > The ONLY procedure that catches an exception is t-expr-catch: > > (define (t-expr-catch port) > > (init-sweet) > > (guard > > (exception > > ((eq? exception 'readable) > > (read-to-unindented-line port) (t-expr-catch port))) > > (t-expr port))) > > > > Is there actually any scheme implementation which benefits from this > catching? I can't image. Our processing program does, because it tries to process as well as it can. But we could change the interface. > I'd feel it might be good to provide a "clean up read" like > `read-to-unindented-line` to help the implementor of a repl. But for > the default it just does not feel right to me. Okay. An easy approach would be to raise an exception on error, and add an option to permit the current behavior (catch and retry). That's an interface change, but the SRFI doesn't define specifics on how to handle errors (since Schemes vary in this matter), and it makes sense that people will want to get errors. Guile 1.8 doesn't support srfi-23 or R7RS, so that would need to be implemented separately on guile. --- David A. Wheeler ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss