Email list hosting service & mailing list manager

Keywords reduced Lassi Kortela (18 Oct 2019 15:25 UTC)
Re: Keywords reduced John Cowan (18 Oct 2019 20:48 UTC)
Re: Keywords reduced Lassi Kortela (18 Oct 2019 22:24 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (19 Oct 2019 08:26 UTC)
Re: Keywords reduced John Cowan (19 Oct 2019 19:04 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (20 Oct 2019 09:15 UTC)
Re: Keywords reduced John Cowan (21 Oct 2019 17:26 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (21 Oct 2019 18:38 UTC)
Re: Keywords reduced Shiro Kawai (21 Oct 2019 19:27 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (22 Oct 2019 06:04 UTC)
Re: Keywords reduced Shiro Kawai (22 Oct 2019 10:07 UTC)
Re: Keywords reduced John Cowan (22 Oct 2019 19:33 UTC)
Re: Keywords reduced John Cowan (22 Oct 2019 19:39 UTC)
Re: Keywords reduced Lassi Kortela (22 Oct 2019 20:06 UTC)
Syntactic keywords vs parentheses Lassi Kortela (22 Oct 2019 20:30 UTC)
Re: Syntactic keywords vs parentheses John Cowan (22 Oct 2019 20:54 UTC)
Re: Syntactic keywords vs parentheses Lassi Kortela (22 Oct 2019 21:08 UTC)
Re: Syntactic keywords vs parentheses Shiro Kawai (22 Oct 2019 22:24 UTC)
Re: Syntactic keywords vs parentheses Lassi Kortela (23 Oct 2019 07:40 UTC)
Re: Syntactic keywords vs parentheses John Cowan (22 Oct 2019 23:12 UTC)
Re: Syntactic keywords vs parentheses Amirouche Boubekki (25 Oct 2019 11:56 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (23 Oct 2019 07:19 UTC)
Re: Keywords reduced John Cowan (21 Oct 2019 23:06 UTC)
Re: Keywords reduced Shiro Kawai (22 Oct 2019 00:42 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (22 Oct 2019 06:12 UTC)
Re: Keywords reduced Lassi Kortela (22 Oct 2019 10:56 UTC)
Re: Keywords reduced Lassi Kortela (20 Oct 2019 09:42 UTC)
Remaining keyword problems Lassi Kortela (29 Oct 2019 17:59 UTC)
allow-other-keys Lassi Kortela (29 Oct 2019 18:29 UTC)
Re: allow-other-keys John Cowan (29 Oct 2019 18:55 UTC)
Re: allow-other-keys Shiro Kawai (29 Oct 2019 19:18 UTC)
Re: allow-other-keys Lassi Kortela (29 Oct 2019 23:04 UTC)
Re: allow-other-keys Marc Feeley (29 Oct 2019 21:05 UTC)
Re: allow-other-keys Marc Nieper-Wißkirchen (03 Nov 2019 08:16 UTC)
Re: allow-other-keys Lassi Kortela (03 Nov 2019 10:11 UTC)
Re: allow-other-keys Marc Nieper-Wißkirchen (03 Nov 2019 10:34 UTC)
Re: allow-other-keys Lassi Kortela (03 Nov 2019 10:54 UTC)
Re: allow-other-keys Marc Nieper-Wißkirchen (03 Nov 2019 11:13 UTC)
Re: allow-other-keys Lassi Kortela (03 Nov 2019 11:39 UTC)
Re: allow-other-keys Arthur A. Gleckler (03 Nov 2019 18:39 UTC)
Re: allow-other-keys Marc Nieper-Wißkirchen (03 Nov 2019 18:48 UTC)
Re: allow-other-keys John Cowan (03 Nov 2019 19:20 UTC)
Re: allow-other-keys John Cowan (03 Nov 2019 19:18 UTC)
Re: allow-other-keys Marc Nieper-Wißkirchen (03 Nov 2019 19:52 UTC)
Re: allow-other-keys John Cowan (03 Nov 2019 22:19 UTC)
Identifier syntax and the range of Schemes to support Lassi Kortela (03 Nov 2019 19:54 UTC)
Re: Remaining keyword problems John Cowan (29 Oct 2019 19:51 UTC)
Re: Remaining keyword problems Lassi Kortela (29 Oct 2019 21:09 UTC)
Alternative syntax using colon symbols for portable keywords Lassi Kortela (29 Oct 2019 22:29 UTC)
Re: Remaining keyword problems Marc Nieper-Wißkirchen (11 Nov 2019 14:56 UTC)
Re: Remaining keyword problems Lassi Kortela (11 Nov 2019 16:15 UTC)
Re: Remaining keyword problems Marc Nieper-Wißkirchen (11 Nov 2019 14:44 UTC)
Re: Remaining keyword problems John Cowan (11 Nov 2019 16:48 UTC)
Re: Remaining keyword problems Marc Nieper-Wißkirchen (11 Nov 2019 17:06 UTC)
Re: Remaining keyword problems John Cowan (11 Nov 2019 17:15 UTC)
Re: Keywords reduced Shiro Kawai (19 Oct 2019 09:25 UTC)
Re: Keywords reduced Lassi Kortela (19 Oct 2019 09:38 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (19 Oct 2019 12:22 UTC)
Re: Keywords reduced Shiro Kawai (19 Oct 2019 18:43 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (20 Oct 2019 08:39 UTC)
Re: Keywords reduced Lassi Kortela (20 Oct 2019 09:28 UTC)
Re: Keywords reduced Shiro Kawai (20 Oct 2019 10:12 UTC)
Re: Keywords reduced Shiro Kawai (20 Oct 2019 10:17 UTC)
Re: Keywords reduced Lassi Kortela (20 Oct 2019 10:23 UTC)
Re: Keywords reduced Shiro Kawai (20 Oct 2019 10:42 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (20 Oct 2019 21:10 UTC)
Re: Keywords reduced Shiro Kawai (20 Oct 2019 21:19 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (20 Oct 2019 21:33 UTC)
Re: Keywords reduced Shiro Kawai (20 Oct 2019 22:05 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (21 Oct 2019 07:01 UTC)
Re: Keywords reduced Shiro Kawai (20 Oct 2019 22:18 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (21 Oct 2019 07:06 UTC)
Re: Keywords reduced Shiro Kawai (21 Oct 2019 07:25 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (20 Oct 2019 21:04 UTC)
Re: Keywords reduced Shiro Kawai (20 Oct 2019 21:41 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (21 Oct 2019 06:50 UTC)
Re: Keywords reduced Shiro Kawai (21 Oct 2019 07:53 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (21 Oct 2019 11:47 UTC)
Re: Keywords reduced Peter Kourzanov (21 Oct 2019 15:42 UTC)
Re: Keywords reduced Marc Nieper-Wißkirchen (21 Oct 2019 15:55 UTC)
Re: Keywords reduced Shiro Kawai (21 Oct 2019 17:38 UTC)
Re: Keywords reduced John Cowan (21 Oct 2019 17:45 UTC)
Re: Keywords reduced Lassi Kortela (22 Oct 2019 08:21 UTC)
Keywords vs paremeters for hygiene Lassi Kortela (21 Oct 2019 08:05 UTC)
Re: Keywords vs paremeters for hygiene Marc Nieper-Wißkirchen (21 Oct 2019 11:23 UTC)

Re: Keywords reduced Marc Nieper-Wißkirchen 23 Oct 2019 07:18 UTC

Am Di., 22. Okt. 2019 um 21:33 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
>
>
> On Tue, Oct 22, 2019 at 2:04 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
>
>>
>> Apart from cleaner code, a syntax-case macro will retain source code
>> location information.
>
>
> "May", not "will".  R6RS-Libraries 12.2 says:  "A syntax object [...] may also be used by an implementation to maintain source-object correlation".

You are right; I was a bit sloppy with my language. However, I think
we agree that maintaining such source-object correlation is desirable,
e.g. for error messages and for debugging purposes. Syntax-case does
allow maintaining this correlation, while systems like
er-macro-transformer do not.

>> This is not only important for debugging but
>> makes it possible to write macros like the R7RS form `include', which
>> shall include the file from the directory where the source of the
>> include form comes from.
>
>
> Note that include in R7RS is non-hygienic: the code is interpolated as-is.

What do you mean by non-hygienic? (Some implementations, namely those
where identifiers are never bare symbols but always wrapped syntax
objects, have some kind of hygiene always built in.)

Let us consider the following piece of code:

(define-syntax foo
  (syntax-rules ()
    ((file) (include file))))

(define-syntax bar
  (syntax-rules ()
    (() (foo "file.scm"))))

(bar)

There are basically three possibilities for the syntactic environment,
in which the identifiers contained in "file.scm" are resolved: In the
syntactic environment of the macro use of "bar", in the
macro-environment resulting from the expansion of "bar" or in the
macro-environment resulting from the expansion of "foo".

The language of R7RS is not exactly clear on that matter, I think. It
could mean the first or the last possibility. Maybe the second.

I am still hoping that a future SRFI to be included in R7RS-large will
clarify this matter so that "include" becomes compatible with the rest
of the syntax system of R7RS.

Racket already shows us how to get a clear, composable and useful
semantics: https://docs.racket-lang.org/reference/include.html. The
primitive form is "include-at/relative-to", and "include" with clear
semantics can be derived from it.

>
>
>>
>> On the other hand, something like `syntax-e' can easily be implemented
>> on top of `syntax-case', so in any `syntax-case' system, you can use
>> your favorite pattern matcher.
>
>
> The rock-bottom core of a syntax-case system (per Eli Barzilay of Racket) is syntax, syntax->datum, datum->syntax, and either syntax-e or syntax-case.

Almost.

Consider:

(lambda (stx)
  (syntax-case stx ()
    (a #'(a b))))

If you want to rewrite this without `syntax-case', you will end up with:

(lambda (stx)
  (list stx #'b))

The difference between the two versions is that the first may return a
wrapped syntax object while the second will return an unwrapped syntax
object. When these procedures are used as macro transformers, this
doesn't make a difference. However, if the syntax object returned by
the first version is wrapped, it can contain source location
information for the whole form #'(a b), while the second version can
only maintain source location information for the two pieces stx (i.e.
#'a) and #'b.

Thus if we do not want to preclude the option to maintain the
source-object correlation, `syntax-case' is strictly more powerful
than `syntax-e' (which, incidentally, wasn't needed in the second
version because of the simplicity of the pattern to match).

Marc