Skip to content
Prev 8976 / 21312 Next

[Bioc-devel] namespace question

At the same time, it would empower developers, who should be free to
assume their own risks. There are already many ways an R user can
break things.

But I agree with the simplicity argument. NAMESPACE, while conforming
to R syntax, does not have "standard" R semantics. Mixing semantics,
especially within the same general syntax, is confusing. It would
become difficult to document the rules to which a valid NAMESPACE file
must conform.

One solution would be to support defining a namespace in pure R via a
NAMESPACE.R that is evaluated in a special environment where the
import/export functions are defined. It would be required to pass
symbols as character vectors. I'm not going there though.

I do think that the current NAMESPACE parser could be simplified by
evaluating the code in a highly constrained environment, only
borrowing if() from base.

For now though I will just change it to only support 'c'. Or, what
about this syntax:

import(foo, except(bar, baz))

Not so R-like but seems to fit in with all of the variadic calls in NAMESPACE.

Michael
On Fri, Apr 1, 2016 at 4:14 PM, Herv? Pag?s <hpages at fredhutch.org> wrote: