From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#15284: wish: make the (name) field optional Date: Fri, 06 Sep 2013 14:06:49 +0200 Message-ID: <87k3iu2lye.fsf@gnu.org> References: <8761ueqq09.wl%arne_bab@web.de> 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]:41300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHuoi-00016i-91 for bug-guix@gnu.org; Fri, 06 Sep 2013 08:07:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHuoZ-0006yF-LI for bug-guix@gnu.org; Fri, 06 Sep 2013 08:07:12 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:35172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHuoZ-0006xW-Fp for bug-guix@gnu.org; Fri, 06 Sep 2013 08:07:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VHuoY-0003Wq-LM for bug-guix@gnu.org; Fri, 06 Sep 2013 08:07:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <8761ueqq09.wl%arne_bab@web.de> (Arne Babenhauserheide's message of "Fri, 06 Sep 2013 11:05:26 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Arne Babenhauserheide Cc: 15284@debbugs.gnu.org Arne Babenhauserheide skribis: > Currently when defining a package, I have to write the name at least > twice: > > (define-public NAME > (name "NAME")) > > This gives the flexibility to use different names for the visual > output and the technical name. But for most packages it likely just > adds useless duplication. > > So I think the (name) field should be optional, and if it is not > present, the packages technical name should be used automatically. As discussed on IRC, the main issue is that package objects exist whether or not the exist a variable bound to them; and really there can be any number of variables whose value is a given package object. IOW, there is no direct connection between the variable name and the package name. That said, for cases like the above, we could have: (define-syntax-rule (define-package package-name fields ...) (define-public package-name (package (name (symbol->string 'package-name)) fields ...))) However, I prefer treating packages just like any other Scheme object, and to avoid introducing =E2=80=9Cmagic=E2=80=9D with macros like this. WDYT? Ludo=E2=80=99.