Am 18.11.2013 10:56, schrieb "Jörg F. Wittenberger": > Am 17.11.2013 22:17, schrieb David A. Wheeler: >> On Sun, 17 Nov 2013 15:13:09 -0500, John Cowan >> <co...@mercury.ccil.org> wrote: >> There is a gimmick we could use. We could create a "reset port" >> function >> that *REMOVES* the entry from the hashtable. Then, on next use, it'd >> recreate the entries. That would be a clean interface, but work >> efficiently >> in a portable way. That would mean that systems would need to >> reset ports if they create huge numbers of them. Sadly, I don't see >> how to >> deal with that cleanly without weak references. >> > > So far I did not understand why does this have to be port-specific in > the first place. Maybe that would be the killer argument. >
I wonder: the code already creates "fake port" object wrappers. Wouldn't this be the natural place to stick such per-port settings into??!! Instead of all those global or parameters, just _copy_ one vector of default values into the "fake port", like this: (define (make-read f) (lambda args (let ((port (if (null? args) (current-input-port) (car args)))) (f (list port (vector-copy default-sweet-read-parameters)))))) Objections? Something why this would not get the job done? (Maybe that would work better, if there was a port->fake-port procedure and a dispatch in the make-read depending on whether an already-upgraded port or a plain port was passed in.) /Jörg ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss