chez-srfi icon indicating copy to clipboard operation
chez-srfi copied to clipboard

Chez parameters are not SRFI-39 compatible

Open weinholt opened this issue 5 years ago • 4 comments

Chez Scheme's parameters are not quite compatible with SRFI-39, as explained by @akeep here: https://github.com/cisco/ChezScheme/issues/409#issuecomment-474819269

However, chez-srfi uses them directly:

(library (srfi :39 parameters)
  (export make-parameter 
          parameterize)
  (import (only (chezscheme) make-parameter parameterize)))

weinholt avatar Mar 20 '19 17:03 weinholt

Okay, it looks like the best thing to do is to remove the special code for Chez Scheme from the library. Can you confirm that this would work for you?

arcfide avatar Mar 23 '19 16:03 arcfide

The implementation in %3a39/parameters.sls doesn't look like it's SRFI-39 either. It's from Ikarus and has the same semantics as Chez Scheme. I'm testing them with the code from the first comment in the linked discussion.

The reference implementation of SRFI-39 works and behaves as it should. I guess the issue with using it is that it might not interact properly with an implementation's threading system. But SRFI-39 happily leaves that unspecified anyway.

weinholt avatar Mar 24 '19 19:03 weinholt

I see. Well, if you have something that works, I'd be happy to take in a pull request! It might take me a bit long to get to this and do it myself.

arcfide avatar Mar 25 '19 13:03 arcfide

The implementation in %3a39/parameters.sls doesn't look like it's SRFI-39 either. It's from Ikarus and has the same semantics as Chez Scheme. I'm testing them with the code from the first comment in the linked discussion.

The reference implementation of SRFI-39 works and behaves as it should. I guess the issue with using it is that it might not interact properly with an implementation's threading system. But SRFI-39 happily leaves that unspecified anyway.

The problem are things like the current-input-port, which have to be supported by the implementation of parameterize.

mnieper avatar Aug 02 '21 11:08 mnieper