From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 06 08:06:56 2013 Received: (at 15284) by debbugs.gnu.org; 6 Sep 2013 12:06:56 +0000 Received: from localhost ([127.0.0.1]:43465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHuoR-0003WU-Ca for submit@debbugs.gnu.org; Fri, 06 Sep 2013 08:06:55 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:52164) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VHuoO-0003WH-9G for 15284@debbugs.gnu.org; Fri, 06 Sep 2013 08:06:53 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id ADD6C14E5; Fri, 6 Sep 2013 14:06:49 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yF4FNX9gO6aX; Fri, 6 Sep 2013 14:06:49 +0200 (CEST) Received: from pluto (unknown [193.50.110.150]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 748CD11CC; Fri, 6 Sep 2013 14:06:49 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Arne Babenhauserheide Subject: Re: bug#15284: wish: make the (name) field optional References: <8761ueqq09.wl%arne_bab@web.de> Date: Fri, 06 Sep 2013 14:06:49 +0200 In-Reply-To: <8761ueqq09.wl%arne_bab@web.de> (Arne Babenhauserheide's message of "Fri, 06 Sep 2013 11:05:26 +0200") Message-ID: <87k3iu2lye.fsf@gnu.org> User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15284 Cc: 15284@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) 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.