Am Di., 22. Okt. 2019 um 01:06 Uhr schrieb John Cowan <xxxxxx@ccil.org>: > > > > On Tue, Oct 22, 2019 at 3:38 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote: > >> We cannot look into the future, but if R7RS-large becomes at least as >> powerful in the macro department, we may even be able to make SRFI >> 177's syntax to be as nice as the existing native systems. > > > I think we can maximize the chance of getting syntax-case accepted in R7RS-large if we can get it ported to Chicken, MIT, and Gauche, the three major holdouts against it. Without two out of three I don't think it'll fly; even if it passes legalistically, not being able to port to those platforms is a big barrier. > > There's no way I can do this work myself, but I think it has to be done, presumably with concomitant modifications to the native explicit-renaming systems on those platforms. MIT has syntactic-closures, which may be a better base; it should be straightforward to see if the Chibi version Just Works. Did you have to patch Chibi to make your library work there? I had to patch Chibi. Explicit renaming macros are a good basis, though; I only the explicit renaming layer of Chibi's syntactic closures. > >> IFirst of all, `define-syntax' has to accept transformers that are just >> a procedure taking a single argument (the form that is to be >> transformed). In this modified system, the original transformers like >> `er-macro-transformer' become forms evaluated at compile time that >> evaluate to such single argument procedures. > > > Chicken definitely cannot do this. Although er- and ir-macro-transformer are procedures, they return opaque transformer objects that are not procedures, and (define-syntax foo (lambda ...)) fails with a dynamic type error "transformer expected but got procedure". I had already taken a look at Chicken's "expand.scm". It is just a trivial patch to make Chicken accept procedures as transformer objects. This is not the only patch needed, though, but all should be relatively minor. It would be easier for me to implement them if I knew someone who has already hacked on Chicken's expander. > >> All of these changes/additions are not particularly hard to implement >> in a working `er-macro-transformer' system. Except for psychological >> reasons, I don't see a barrier. > > > The psychological when projected outwards becomes the political. > > > > John Cowan http://vrici.lojban.org/~cowan xxxxxx@ccil.org > Evolutionary psychology is the theory that men are nothing but horn-dogs, > and that women only want them for their money. --Susan McCarthy (adapted) >