David A. Wheeler scripsit: > Hmm. R7RS has make-parameter, as does SRFI-39. But guile 1.6 has > neither, and I don't know how widely-available these really are.
The implementation given in R7RS is pretty portable, but should *not* be used on Schemes with their own implementations, because it may not be thread safe. Note that R7RS parameters, unlike SRFI 39 ones, are not mutable (as opposed to rebindable): if you want a mutable parameter, bind the parameter to a mutable object such as a pair. This was done to improve portability. In some Schemes, parameters are reset in child threads to their initial value; in other Schemes the mutated value is copied to the child thread. If you never mutate a parameter, this difference is not visible. > Is there a reasonable way to make these port-specific? I don't see any obvious way to do so, except with a weak-keyed hash table mapping ports to values. Unfortunately, weak-keyed hash tables are non-portable in the nature of things. -- John Cowan http://ccil.org/~cowan co...@ccil.org Lope de Vega: "It wonders me I can speak at all. Some caitiff rogue did rudely yerk me on the knob, wherefrom my wits yet wander." An Englishman: "Ay, belike a filchman to the nab'll leave you crank for a spell." --Harry Turtledove, Ruled Britannia ------------------------------------------------------------------------------ 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