guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Package modules


From: Ludovic Courtès
Subject: Re: Package modules
Date: Mon, 29 Feb 2016 10:52:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Fabian Harfert <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]