From: Julian Graham <joolean@gmail.com>
To: Neil Jerram <neil@ossau.uklinux.net>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guile-devel@gnu.org
Subject: Re: r6rs libraries, round two
Date: Sun, 28 Jun 2009 14:23:19 -0400 [thread overview]
Message-ID: <2bc5f8210906281123i6ca818een54877d54e8fc56b3@mail.gmail.com> (raw)
In-Reply-To: <87y6rcfpwo.fsf@arudy.ossau.uklinux.net>
Hi Neil,
> I assume the objective here is to allow a Guile program or module to
> use a portable R6RS library; i.e., specifically, allowing
> `(use-modules ...)' or `#:use-module (...)' to resolve to an R6RS
> library. Is that correct?
Actually, my immediate-term goal was to add versioning info to Guile's
"native" modules in an R6RS-compatible way. Once that's done, the
level of compatibility you're describing would be feasible, although I
think it'd be up for discussion as to whether it's something we want.
I kind of assumed that in the first iteration there'd be an explicit
bridge into R6RS library territory, e.g., `(rnrs-import ...)' or
something like that.
> Yes, at least as far as R6RS library modules are concerned. I've
> reviewed the relevant discussions on this now and am happy that
> there's no desire to support multiple live versions of R6RS libraries.
>
> I'd prefer not to rule this out, though, for any future versioning
> that we might add to (define-module ...). Is that feasible?
Not sure I understand -- the impression I got from earlier messages in
this thread was that we would be implementing R6RS libraries on top of
Guile modules, after first extending the module form to include
version metadata.
> - Once we're into R6RS library code, we're OK, because the R6RS layout
> requires all of the imports to be declared upfront; so we don't need
> to read the rest of the library code.
Yes -- from what I can tell, R6RS effectively prohibits "dynamic"
access to the import system. That is, an import call always results
directly from a previous import, never from the evaluation of an
expression.
(This strikes me as a little weird, since it means that building an
application with a "plugin" architecture would require you to roll
your own import system, but I suppose that's not too far afield from
what languages like C# make you do in that regard.)
> - In a Guile module, we could specify that versioned imports can only
> be done by #:use-module expressions as part of the (define-module
> ...) form, and not support versioned imports by (use-modules ...).
> Then we'd only have to read the (define-module ...) form.
So what would the semantics of the version-less (use-modules ...) be
in the context of versioned modules already loaded via #:use-module
expressions? To minimize version-clash, I'm guessing we'd defer to
already-loaded modules when possible -- although this wouldn't address
the case in which a module loaded at runtime via (use-modules ...)
introduces a #:use-module dependency that conflicts with an
already-loaded module.
> Hmm.. it seems this boils down to saying that we would partially
> deprecate `(use-modules ...)'.
Or at least point out that its use prevents Guile from being able to
guarantee conflict-less execution.
> I can imagine a less clever approach, in which each import is
> considered as we come to it, and
[snip]
I think this is what I was trying to suggest, stated more clearly.
And unless I'm misunderstanding, I think this makes sense as behavior
for (use-modules ...), with the caveats mentioned above.
Regards,
Julian
next prev parent reply other threads:[~2009-06-28 18:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 20:31 r6rs libraries, round two Julian Graham
2009-05-30 23:22 ` Neil Jerram
2009-05-30 23:34 ` Julian Graham
2009-06-01 19:55 ` Andy Wingo
2009-06-01 22:34 ` Ludovic Courtès
2009-06-03 18:36 ` Neil Jerram
2009-06-04 6:50 ` Ludovic Courtès
2009-06-28 0:20 ` Julian Graham
2009-06-28 13:28 ` Neil Jerram
2009-06-28 18:23 ` Julian Graham [this message]
2009-06-28 21:40 ` Andy Wingo
2009-06-29 18:01 ` Julian Graham
2009-06-29 18:26 ` Ludovic Courtès
2009-07-06 18:02 ` Julian Graham
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=2bc5f8210906281123i6ca818een54877d54e8fc56b3@mail.gmail.com \
--to=joolean@gmail.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
--cc=neil@ossau.uklinux.net \
/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).