From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Package modules Date: Mon, 29 Feb 2016 10:52:48 +0100 Message-ID: <87twkrj11r.fsf@gnu.org> References: <87io1no0zx.fsf@grrlz.net> <20160217223535.GA32658@solar> <20160218154530.1dc7539d@alarmpi> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaKVc-0007H2-KB for guix-devel@gnu.org; Mon, 29 Feb 2016 04:52:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaKVY-0005zK-KY for guix-devel@gnu.org; Mon, 29 Feb 2016 04:52:56 -0500 In-Reply-To: <20160218154530.1dc7539d@alarmpi> (Fabian Harfert's message of "Thu, 18 Feb 2016 15:45:30 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Fabian Harfert Cc: guix-devel@gnu.org Fabian Harfert 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 =E2=80=9Cpackage modules=E2=80=9D= 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=E2=80=99s module system. The downside (the one you had in mind I gue= ss?) 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=E2=80=99.