From: "Marc Nieper-Wißkirchen" <marc@nieper-wisskirchen.de>
To: Maxime Devos <maximedevos@telenet.be>
Cc: Taylan Kammer <taylan.kammer@gmail.com>,
"guile-devel@gnu.org" <guile-devel@gnu.org>,
Lassi Kortela <lassi@lassi.io>,
Arne Babenhauserheide <arne_bab@web.de>
Subject: Re: Are library names data or syntax?
Date: Tue, 23 Jul 2024 16:42:57 +0200 [thread overview]
Message-ID: <CAEYrNrSD9pVW+Ayc6aS=XS71sCsxoL1iHiEpNNt9gp4PRU6stA@mail.gmail.com> (raw)
In-Reply-To: <20240722204721.qinL2C00T2kuPDg01inMky@xavier.telenet-ops.be>
[-- Attachment #1: Type: text/plain, Size: 2190 bytes --]
Am Mo., 22. Juli 2024 um 20:47 Uhr schrieb Maxime Devos <
maximedevos@telenet.be>:
> > [...]
>
> >
>
> >In what kind of situation might a library name be made up of identifiers
> (syntax objects) that might need to carry lexical information?
>
>
>
> As implied by the previous: never (in Guile, and probably most others).
>
>
>
> The only exception I can think of, is if:
>
>
>
> * ‘define-library’/’library’ is implemented as a macro (this is not part
> of RnRS, but AFAIK neither is it against the standard)
>
> * hence, you can define a module from within another module (might be
> situationally useful, but comes with new difficulties for module lookup)
>
> * there are multiple module namespaces
>
> * to determine which module namespace to put the module in,
> ‘define-library’ uses lexical information
>
> * in particular, it uses components of the name of the library for lexical
> information, even though there are other options like using the _*whole*_
> name (i.e., (foo bar) itself instead of ‘foo’ or ‘bar’).
>
>
>
> That’s a lot of ifs, and even then identifiers aren’t necessary, since
> (AFAIK) the name (foo bar) itself carries lexical information (not sure).
>
>
>
> I’ve been assuming that numbers (in syntax) (say, #'3) don’t carry lexical
> info, but since ‘syntax numbers’ carry file name+position information, it’s
> not much of a stretch to potentially also include lexical information, so
> perhaps numbers would work just fine too! (Implementation-dependent, but
> ‘multiple module namespaces’ and ‘define-library as a macro’ are also
> implementation-dependent.)
>
This would need a redefinition of what a syntax object is (see the R6RS).
In principle, this would be possible, but the result would be incompatible
with the R6RS. In R6RS, a macro transformer is allowed to output raw
numbers; this would not be allowed in a hypothetical Scheme version that
assumes that numbers necessarily carry a wrap (as identifiers do in the
R6RS).
Source location information is not mandatory information for the expander,
so this reasoning does not apply here.
Marc
[-- Attachment #2: Type: text/html, Size: 4132 bytes --]
prev parent reply other threads:[~2024-07-23 14:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1941.1721507730.3505.guile-devel@gnu.org>
2024-07-21 9:54 ` guile-devel Digest, Vol 260, Issue 25 Marc Nieper-Wißkirchen
2024-07-22 8:12 ` Are library names data or syntax? Taylan Kammer
2024-07-22 9:14 ` Marc Nieper-Wißkirchen
2024-07-22 17:43 ` Numbers in library names Lassi Kortela
2024-07-22 17:56 ` Marc Nieper-Wißkirchen
2024-07-22 18:12 ` Lassi Kortela
2024-07-22 18:47 ` Maxime Devos
2024-07-22 20:52 ` Artyom Bologov
2024-07-22 21:01 ` Marc Nieper-Wißkirchen
2024-07-22 21:05 ` Artyom Bologov
2024-07-22 21:09 ` Marc Nieper-Wißkirchen
2024-07-23 15:05 ` Lassi Kortela
2024-07-23 15:16 ` Marc Nieper-Wißkirchen
2024-07-23 15:36 ` Lassi Kortela
2024-07-23 16:01 ` Maxime Devos
2024-07-23 16:12 ` Lassi Kortela
2024-07-23 16:20 ` Maxime Devos
2024-07-22 18:47 ` Are library names data or syntax? Maxime Devos
2024-07-22 21:05 ` Dr. Arne Babenhauserheide
2024-07-22 21:14 ` Marc Nieper-Wißkirchen
2024-07-23 14:42 ` Marc Nieper-Wißkirchen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEYrNrSD9pVW+Ayc6aS=XS71sCsxoL1iHiEpNNt9gp4PRU6stA@mail.gmail.com' \
--to=marc@nieper-wisskirchen.de \
--cc=arne_bab@web.de \
--cc=guile-devel@gnu.org \
--cc=lassi@lassi.io \
--cc=maximedevos@telenet.be \
--cc=taylan.kammer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).