[Top][All Lists]

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

bug#15284: wish: make the (name) field optional

From: Ludovic Courtès
Subject: bug#15284: wish: make the (name) field optional
Date: Fri, 06 Sep 2013 14:06:49 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Arne Babenhauserheide <address@hidden> 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

That said, for cases like the above, we could have:

  (define-syntax-rule (define-package package-name fields ...)
    (define-public package-name
        (name (symbol->string 'package-name))
        fields ...)))

However, I prefer treating packages just like any other Scheme object,
and to avoid introducing “magic” with macros like this.



reply via email to

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