[ssax-sxml] Re: small code modification request in look-for-str.scm (for cleanup + work around kawa
Brought to you by:
oleg
From: <ol...@po...> - 2003-07-16 20:19:17
|
Hello! > Kawa has trouble with a form in look-for-str.scm. >... > Instead of currently > (define (MISCIO:find-string-from-port? str <input-port> . max-no-char) > (set! max-no-char (if (null? max-no-char) #f (car max-no-char))) Indeed today I would most likely use let rather than set!. The code was written back in 1996. The code is included in SLIB. This makes me wonder if SLIB runs on Kawa? If it does, then the problem above must have been solved. > I wonder whether it could be rewritten to take advantage of > input-parse.scm which provides the define-opt syntax to better express > what it's is doing I've been thinking that define-opt (and related lambda-opt) seem quite useful. Therefore, I'm planning to move them into the myenv* files (so I can use platform-specific features appropriate for each platform, and avoid too many cond-expands and Gambit-related macros). For PLT Scheme, I can use their native lambda-opt. For other systems, a syntax-rules implementation should suffice. > Kawa does not have with-input-from-string that's used therein, only > call-with-input-string -- [... I'm beginning to hate Scheme for > portability] -- ok, gambit has that one as well, but not bigloo... Perhaps browsing myenv*.scm files might prove helpful. I've encountered the problem that hardly any system offers exactly the set of *input*-string and *output*-string functions that I like. However, it seems that the "missing" functions can always be defined in terms of existing ones. Cheers, Oleg |