It's probably better to make it a runtime error, but note that it's
not necessarily a bad idea to add attributes to singleton symbols.
Those are used in Emacs Lisp for a variety of purposes. They just need
strong conventions (part of that is that in Emacs many symbols are
prefixed with a
Thanks for spotting this issue. The short answer is yes, adding
attributes to a symbol is a bad idea and will be turned into a runtime
error soon. Maintainers of packages that add attributes to symbols have
been notified and some have already fixed their code.
At least in one case the
Attributes on symbols seem like a bad idea to me. An additional
obscure part of the global state seems undesirable. I can't see how
any use of them would be preferrable to storing an environment in some
global variable, in which the same information could be recorded.
Note that the attributes
Here is a simpler example:
ex <- as.name("a")
attr(ex, "test") <- 1
quote(a)
a
attr(,"test")
[1] 1
Torsten
On Thu, 6 Jul 2017, William Dunlap wrote:
The multcomp package has code in multcomp:::expression2coef that attaches the
'coef' attribute to
symbols. Since there is only one symbol