Re: [Rd] S3 methods in default namespace

From: Hadley Wickham <hadley_at_rice.edu>
Date: Mon, 29 Aug 2011 07:20:00 -0500

>> 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.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 29 Aug 2011 - 12:23:11 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 29 Aug 2011 - 17:00:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive