[alexandria-devel] concatenate-symbol

Nikodemus Siivola nikodemus at random-state.net
Fri Nov 17 12:04:56 UTC 2006


"Attila Lendvai" <attila.lendvai at gmail.com> writes:

> i've got this ready to be pushed and i suggest this for inclusion
> and/or discussion:
>
> (defun concatenate-symbol (&rest args)
>  "A DWIM symbol concatenate: Args will be converted to string and be
> concatenated
> to form the resulting symbol with one exception: when a package is
> encountered then
> it is stored as the target package to use at intern. If there was no package
> among the args then the symbol-package of the first symbol encountered will be
> used. If there are neither packages nor symbols among the args then
> the result will
> be interned into the current package at the time of calling."

I'd like it better as 

 (concatenate-symbol package-designator &rest string-designators)

where T as package is equivalent to *package*, and NIL means to create
an uninterned symbol, or

 (concatenate-symbol package-or-string-designator &rest string-designators)

where the first argument can either be the package to intern in. In
any case, having an optional package /somewhere/ among the arguments
seems a bit arbitrary.

..but then again, I've been pretty happy with FORMAT-SYMBOL, so maybe
my use-cases are different.

Cheers,

  -- Nikodemus              Schemer: "Buddha is small, clean, and serious."
                   Lispnik: "Buddha is big, has hairy armpits, and laughs."



More information about the alexandria-devel mailing list