Skip to content

Increase transparency: suggestion on how to avoid namespaces and/or unnecessary overwrites of existing functions

2 messages · Dominick Samperi, Spencer Graves

#
On Tue, Aug 23, 2011 at 2:23 PM, Janko Thyson
<janko.thyson.rstuff at googlemail.com> wrote:
Experts from the Lisp-Stats community have added a number
of functions to R that were inspired by Lisp, but one feature that apparently
was not added is the shadowing feature of Common Lisp. Here the default
behavior is not to permit packages to import conflicting names unless
explicit shadowing directives are specified.

Arguably a package is not intended to be used like a callable library,
yet this is the way they are often used in the R context. This kind of
shadowing tool might help to make this practice safer, at the expense
of requiring the developer to specify explicit shadowing directives.

Dominick
#
When selecting names for functions and variables, I sometimes use 
library(sos) to look for existing conflicts with other packages.  This 
won't solve all the problems Janko mentioned, but it can help avoid 
some.  Spencer
On 10/1/2011 9:11 AM, Dominick Samperi wrote: