From: Olivier Dion via General Guile related discussions <guile-user@gnu.org>
To: Christine Lemmer-Webber <cwebber@dustycloud.org>,
Chris Vine <vine35792468@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Ideas for making Guile easier to approach
Date: Wed, 09 Feb 2022 16:05:40 -0500 [thread overview]
Message-ID: <8735krn42j.fsf@laura> (raw)
In-Reply-To: <87o83fdeqz.fsf@dustycloud.org>
On Wed, 09 Feb 2022, Christine Lemmer-Webber <cwebber@dustycloud.org> wrote:
> Module names
> ============
>
> ice-9 -> guile
> --------------
> I think that ice-9 is a weird namespace for "guile's standard library"
> but it's what we have for historical reasons. Still I would have
> preferred that namespace simply be "guile", so we have (guile match) and
> (guile format) instead of (ice-9 ...). It would be clearer what ice-9
> *is* to have it be called "guile" instead. But maybe it's too late for
> that. How much work would it be to do an alias like this?
This is so true. (guile) should have be the name of that module. It
can be very confusing for newcomers.
> Named SRFIs
> -----------
>
> If it's possible to do such aliases, I'd also say that making sense of
> what SRFI module is what is a real mess for me. (srfi srfi-9) doesn't
> tell me what that SRFI *is*. However, if we supported "named" versions
> of SRFIs, that would help me. Which of these would be easier to read?
I too find this very weird. I don't have a cheat sheet for SRFI name
mapping on my desk and it's very awkward. Image if python was doing
this ..
import srfi.srfi-1
import srfi.srfi-26
import srfi.srfi-64
now very much human friendly.
> We had:
>
> (define-module (my-module)
> #:use-module (guile match)
> #:use-module (guile format)
> #:use-module (srfi list-utils)
> #:use-module (srfi records)
> #:use-module (srfi args-fold)
> #:use-module (srfi streams)
> #:use-module (srfi tests))
>
> Much easier to follow, no?
Yes! For the aliases I think something like this could work for now:
(define-syntax-rule (alias-module module-name)
(let ((mod (current-module)))
(module-for-each (lambda (sym var) (module-define! mod sym var))
(module-public-interface
(resolve-module (quote module-name))))
(module-export-all! mod)
#f))
then in srfi/tests.scm:
(define-module (srfi tests))
(alias-module (srfi srfi-64))
Ideally, something like this should be supported instead:
(define-module (srfi srfi-64)
#:alias (srfi tests))
--
Olivier Dion
Polymtl
next prev parent reply other threads:[~2022-02-09 21:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 12:19 Newbie thoughts on Guile Hall + Guix Blake Shaw
2022-02-08 19:46 ` Chris Vine
2022-02-09 15:18 ` Ideas for making Guile easier to approach Christine Lemmer-Webber
2022-02-09 20:33 ` Daniel Tornabene
2022-02-09 21:05 ` Maxime Devos
2022-02-09 23:06 ` Keith Wright
2022-02-09 21:05 ` Olivier Dion via General Guile related discussions [this message]
2022-02-09 21:07 ` Maxime Devos
2023-10-05 14:15 ` Dr. Arne Babenhauserheide
2022-02-09 23:01 ` Chris Vine
2022-02-10 0:56 ` Timothy Sample
2022-02-10 10:01 ` Ricardo Wurmus
2022-02-10 1:32 ` Blake Shaw
2022-02-10 2:02 ` paul
2022-02-10 11:27 ` Mikael Djurfeldt
2022-02-10 14:34 ` Leo Butler
2022-02-10 15:58 ` Mikael Djurfeldt
2022-02-10 18:25 ` Olivier Dion via General Guile related discussions
2023-09-27 19:29 ` Christine Lemmer-Webber
2023-09-28 12:30 ` Maxime Devos
2022-02-09 6:28 ` Newbie thoughts on Guile Hall + Guix Catonano
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=8735krn42j.fsf@laura \
--to=guile-user@gnu.org \
--cc=cwebber@dustycloud.org \
--cc=olivier.dion@polymtl.ca \
--cc=vine35792468@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).