On Wed, May 13, 2009 at 3:03 PM, Derick Eddington <[email protected]> wrote: >> but the mere existence of Ikarus and psyntax >> implementations destroyed their portability. > > Not true. Larceny's instantiation semantics (explicit phasing, single > instantiation) and Ypsilon's semantics (no phasing, single > instantiation) are also not compatible with doing what PLT does (i.e. > relying on their multiple instantiation to clean-up side-effects). And > I believe Scheme48 and other upcoming non-psyntax R6RS systems also will > be single instantiation (but I could be wrong, we'll see). So in fact, > PLT is the minority and might become even more so.
What you say is correct but does not address the use case I was alluding to. This library (library (example) (export) (import (rnrs) (registry)) (add-registry! "some function" (lambda (x) 'something))) (add-registry! "some other function" (lambda (x) 'something-else))) ) which is based purely on side effects at run-time would work on PLT, Larceny and Ypsilon but not on Ikarus and Mosh. > Give me a complete concrete real-world example of what you'd like to translate > to Ikarus, else we're just blowing more hot air. The example is above. > >> I am not happy with that. > > Then keep using Python or use a different Scheme implementation. No need, I will just change the library as follows: (library (example) (export init-registry) (import (rnrs) (registry)) (define (init-registry) (add-registry! "some function" (lambda (x) 'something))) (add-registry! "some other function" (lambda (x) 'something-else)))) ) and I will call init-registry explicitly in user code. No big deal and it is even clearer. In the case of a CLOS implementation where define-method is adding methods to the internal registry I can also define an initialization function (even a dummy one) and call it just to be sure the module is instantiated. So Aziz is right that I am making a big fuss over a thing which can be easily solved. I am making all this fuss because it is less easy to explain to a beginner what is going on and why he cannot apply his experience with PLT, Larceny or Ypsilon to Ikarus and in general to systems based on psyntax. But this can be solved with documentation and I am willing to close this discussion now.
