In favor of explicit argument
Shiro Kawai
(09 Aug 2020 01:33 UTC)
|
Re: In favor of explicit argument
Lassi Kortela
(09 Aug 2020 06:46 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(09 Aug 2020 09:27 UTC)
|
Re: In favor of explicit argument
Adam Nelson
(10 Aug 2020 22:25 UTC)
|
Re: In favor of explicit argument
Shiro Kawai
(10 Aug 2020 23:46 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(11 Aug 2020 07:58 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(11 Aug 2020 01:29 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(11 Aug 2020 07:17 UTC)
|
Re: In favor of explicit argument
Jim Rees
(11 Aug 2020 16:45 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(11 Aug 2020 16:57 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(12 Aug 2020 02:20 UTC)
|
Re: In favor of explicit argument
John Cowan
(12 Aug 2020 02:49 UTC)
|
Re: In favor of explicit argument
Arthur A. Gleckler
(12 Aug 2020 03:23 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(12 Aug 2020 13:29 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(12 Aug 2020 19:46 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(13 Aug 2020 00:40 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(13 Aug 2020 07:18 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(14 Aug 2020 01:24 UTC)
|
Re: In favor of explicit argument
Adam Nelson
(13 Aug 2020 01:13 UTC)
|
Re: In favor of explicit argument
John Cowan
(13 Aug 2020 01:53 UTC)
|
Re: In favor of explicit argument
Adam Nelson
(13 Aug 2020 03:09 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(13 Aug 2020 03:16 UTC)
|
Re: In favor of explicit argument
John Cowan
(13 Aug 2020 03:31 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(13 Aug 2020 08:04 UTC)
|
Re: In favor of explicit argument
Jim Rees
(13 Aug 2020 18:24 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(13 Aug 2020 20:05 UTC)
|
Re: In favor of explicit argument
John Cowan
(14 Aug 2020 02:41 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(14 Aug 2020 06:34 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(14 Aug 2020 13:30 UTC)
|
Re: In favor of explicit argument
Marc Nieper-Wißkirchen
(14 Aug 2020 14:08 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(15 Aug 2020 22:56 UTC)
|
Re: In favor of explicit argument Marc Nieper-Wißkirchen (16 Aug 2020 07:55 UTC)
|
Re: In favor of explicit argument
Alex Shinn
(14 Aug 2020 02:29 UTC)
|
[Addressing the SRFI 206 mailing list as well.] Am So., 16. Aug. 2020 um 00:56 Uhr schrieb Alex Shinn <xxxxxx@gmail.com>: > > On Fri, Aug 14, 2020 at 10:30 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote: >> >> PS One more argument for "define-auxiliary-syntax" is that it is the >> more primitive construct vs. the magic module. > > > Any sufficiently advanced technology is indistinguishable from magic. Magic in the sense that the (srfi 206 *) module is (yet) the only module, which does not export a finite list of identifiers. > I disagree with your perception of the (auto) module being more "magic" > than your binding manipulation primitives. (auto) is actually more > natural and easier to implement if you have a module meta language > like Chibi or Scheme48. Not all Schemes have a module meta language. For some Schemes, (srfi 206 *) may be easier to implement, for others (srfi 206). > Treating "bindings" as first class and providing primitives to manipulate > them feels more magical to me. I'm not sure the Chibi implementation > is correct, and have doubts about the general portability of the idea. The Chibi implementation is far from fully tested; it is so far a two-hour work to provide proof of concept. That said, I don't understand what you mean by treating "bindings" as first-class in this context? "define-auxiliary-syntax" is no primitive to manipulate bindings. The variable names a location and a keyword names a type of syntax. "define-auxiliary-syntax" just binds an identifier so that it names a type of syntax, which is possibly named by other identifiers as well. But this is absolutely nothing new in R7RS: (import (scheme base) (rename (scheme base) (+ plus)) In the lexical environment resulting from this import declaration, both "+" and "plus" name the same location. > In particular, you're relying on managing these first class bindings via > a hash-table at compile time, which leads me to wonder how this > would work with separate compilation? I think this is unrelated to whether these auxiliary syntax bindings are introduced through (srfi 206 *) or through explicit uses of "define-auxiliary-syntax". The only bindings that are relevant for separate compilation are module top-level bindings and for these, (srfi 206 *) and define-auxiliary-syntax are equipotent. In any case, making it work with separate compilation is easy. Just to have something concrete, let's take the model from https://legacy.cs.indiana.edu/~dyb/pubs/implicit-phasing.pdf, which also underlies Chez and psyntax. Here, during expansion type, every (top-level) identifier is mapped to a unique label, where the uniqueness is maintained across separately compiled modules. When such a compiled module is visited or invoked, a table mapping labels to bindings (locations or types of syntax) is created on the fly. So all that has to be done is to add a new type of label (which maps 1:1 to symbols), which corresponds to auxiliary syntax keywords created through the import from (srfi 206 *) or through define-auxiliary-syntax. I will add another proof of concept for separate compilation. Besides, as I have mentioned before, Chez Scheme, which has separate compilation, already has the "alias" binding construct, which creates aliases (two or more identifiers naming the same location or type of syntax) in the above sense. Marc