Skip to content

Developing with Namespaces (was: Recent and upcoming changes to R-devel)

1 message · Mark Bravington

#
Hi Kasper

FWIW, the package development and maintenance support in 'mvbutils' makes it trivial to work with namespaced packages, even at the earliest stages of development. It's completely easy to add and remove functions to/from the namespace (and the exported visible bit) while the package is loaded. Debugging is seamless (via the 'debug' package, anyway). There is no need to re-load the sources or rebuild the package when you make changes-- the source version and installed version all get updated automatically.

I've done a namespaced-package-from-standing-start in under 10mins, and could probably shorten that if a beer was at stake. I've also forced a few colleagues to build packages this way, and have had positive feedback.

Of course, to get all these wonderful things, you do have to somewhat buy in to 'mvbutils' way of working. But that's not necessarily a bad thing ;)

For me, it's definitely been preferable to build in the namespace from the start, because otherwise additional errors can appear when functions become "unexported". Namespaces really do clarify things and avoid the search-order problems, so the key thing is just to make sure the development cycle is easy when namespaces are involved.

bye
Mark



Mark Bravington
CSIRO CMIS
Marine Lab
Hobart
Australia