unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Fabian Harfert <fhmgufs@web.de>
Cc: guix-devel@gnu.org
Subject: Re: Package modules
Date: Mon, 29 Feb 2016 10:52:48 +0100	[thread overview]
Message-ID: <87twkrj11r.fsf@gnu.org> (raw)
In-Reply-To: <20160218154530.1dc7539d@alarmpi> (Fabian Harfert's message of "Thu, 18 Feb 2016 15:45:30 +0100")

Fabian Harfert <fhmgufs@web.de> skribis:

> I don't understand the point that makes package modules necessary in
> general and theoretically. We can have each package only once, so
> there's no need for that.
>
> I know that practically it is necessary because it's easy to structure
> and results from the definition of packages like program code.

Right.  The thing to keep in mind is that “package modules” are just
regular Scheme modules/libraries that export variables and import other
modules.

The advantage is that we get the semantics and all the functionality of
Guile’s module system.  The downside (the one you had in mind I guess?)
is the boilerplate in each file.

I think the advantages outweigh the disadvantages, though it would be
cool if Guile supported a Racket-style #lang construct to help reduce
boilerplate.

> But why isn't it possible to include all the packages modules from (gnu
> packages) automatically? Is there something speaking against that?

Yes.  For one, having control over which modules are imported allow you
to make sure there are no name clashes, no ambiguities, and such.

Thanks,
Ludo’.

      reply	other threads:[~2016-02-29  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 14:38 Needs new category/file: Reverse Engineering Software Nils Gillmann
2016-02-17 22:35 ` Andreas Enge
2016-02-18 14:33   ` Nils Gillmann
2016-02-18 19:29     ` Andreas Enge
2016-02-18 14:45   ` Package modules Fabian Harfert
2016-02-29  9:52     ` Ludovic Courtès [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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twkrj11r.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=fhmgufs@web.de \
    --cc=guix-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).