[Rd] legitimate use of :::

Duncan Murdoch murdoch.duncan at gmail.com
Mon Aug 26 03:28:17 CEST 2013


On 13-08-24 12:46 PM, Kasper Daniel Hansen wrote:
> On Thu, Aug 22, 2013 at 8:27 PM, Peter Meilstrup Using ::: on a package you
> don't control can be more dangerous. For a
>>
>> package author to choose to export a function to the public interface
>> represents at least some assurance that that interface will be stable or
>> slow-moving. But there are no implied assurances about how code in the
>> private namespace might change behind the scenes. I might completely
>> refactor the code and change the behavior of any private function between
>> 0.0.1 releases, but I would not do that for exported functions.
>
>
> This is true (that it could be dangerous), but sometimes, as a package
> author, I am willing to take this risk.  Personally, I don't do this
> lightly, but sometimes there is no way around it, particular if the hidden
> function does some magic in its own NAMESPACE.  It is not all functions
> that one can just easily copy over into you own package.
>
> It is fine to say that the use of ::: should be discouraged, it is another
> thing if it prevents you from submitting to CRAN (which I don't know for
> sure; I thought that Notes were ok?).

CRAN is a good place to send your packages because it does some quality 
control on the packages it accepts.  As I said in my message to Yihui, 
if you think the test is wrong, you can argue about that and it might be 
changed, but if you can't convince the CRAN maintainers of the validity 
of your point, you shouldn't send your package there.  There are plenty 
of other places (github, R-forge, etc.) where you can distribute it.

Duncan Murdoch



More information about the R-devel mailing list