[Rd] S3 methods in default namespace
Uwe Ligges
ligges at statistik.tu-dortmund.de
Mon Aug 29 14:37:52 CEST 2011
On 29.08.2011 14:20, Hadley Wickham wrote:
>>> So doesn't that break packages that use S3 but don't have a NAMESPACE?
>>
>> Maybe, but since the methods are exported as functions they are also found
>> for method dispatch and imported, if another package imports from the
>> Namspace. The problem I see is what happens if method dispatch is done on a
>> package that is not attached but just the Namespace is only loaded.
>>
>> Anyway, we should really recommend that package authors write NAMESPACE
>> files in case their packages are not trivial.
>> Note that there are many CRAN packages that fail under R-devel, some of them
>> sue to NAMESPACE issues.
>
> I'm not sure I understand the approach of providing a default
> NAMESPACE. Why not just make it a requirement to pass R CMD check?
> That seems like it would be a safer approach, although it would create
> some work for people who have not yet started using namespaces.
Making it an requirement would certainly be the cleanest approach, but
there are other constraints. One of them CRAN maintainability. Example:
Consider some people do not fix packages in time that are in the list of
dependencies of others, then the whole hierarchy is broken. We try to
make the transition a bit more smoothly.
Uwe
> Hadley
>
>
More information about the R-devel
mailing list