Finally, I would like to close this discussion.

To recapitulate: I proposed to extend SRFI 139 by adding the requirement that all R7RS keywords should become syntax-parameters. 

I also gave a rationale for this: "Keywords defined by define-syntax-parameter are indistinguishable from keywords defined by define-syntax as long as syntax-parameterize is absent, so this requirement does not change the semantic meaning of any existing code. On the other hand, being able to reparameterize built-in keywords can make a lot of sense. One natural candidate is quasiquote, whose name is tied to the reader. The extra requirement would make it possible to give quasiquote a different (or extended meaning) in well-defined lexical scopes."

However, I have come to the belief that it is not a good idea to change the semantics of the R7RS keywords even when it makes no difference when syntax-parameterize is not used. The reason is quite simple:

How would the following code behave:

(import (scheme base) (srfi 139) (my-lambda))
(syntax-parameterize ((lambda (syntax-rules () ((lambda formals body) (my-lambda formals body)))
  (let () (display "Hi!\n")))

If (scheme base) defines let in terms of lambda as it is in the section 7 of the R7RS, the above would expand into a macro use of my-lambda, which is assumed to be exported by (my-lambda). On the other hand, if (scheme base) implements let natively, a macro use of my-lambda would never show up.

So making all keywords syntax-parameters would expose too much of the internal workings of libraries that were not written with SRFI 139 in mind.

Thus I finally withdraw my proposal. SRFI 139 should be kept exactly as it is.

--

Marc

Arthur A. Gleckler <xxxxxx@speechcode.com> schrieb am Sa., 29. Okt. 2016 um 23:23 Uhr:
Okay, please submit your revised draft.  If no one objects over the next week, we can consider it an erratum and publish the revised version.

On Sat, Oct 29, 2016 at 2:05 PM, Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
In SRFI 139, you mention that Guile and Racket also implement syntax parameters. 

Guile seems to make no difference between keywords defined by define-syntax and keywords defined by define-syntax-parameter thus complies to the proposed fix.

Racket does make a difference and does not allow to syntax-parameterize quasiquote, for example.

Rapid Scheme is my own implementation and is easily adapted to the fixed SRFI.

For Schemes like Racket, the code like the following duplicated for all keywords in question can be used to make them comply to the proposed fix of the SRFI:

(import (rename (scheme base) quasiquote scheme-quasiquote))

(define-syntax-parameter quasiquote
  (syntax-rules ()
    ((quasiquote . args) (scheme-quasiquote . args))))

So it is not a big deal.

Marc