From @purdle@@ @ending from gm@il@com  Thu Aug  9 23:45:29 2018
From: @purdle@@ @ending from gm@il@com (Abs Spurdle)
Date: Fri, 10 Aug 2018 09:45:29 +1200
Subject: [Rd] WishList: Remove Generic Arguments
Message-ID: <CAB8pepwoUPZRQ8V_OCaZq=QdM3fRbT4zYa8OjOgZvKucmSVFQA@mail.gmail.com>

 I apologize if this issue has been raised before.

I really like object oriented S3 programming.
However, there's one feature of object oriented S3 programming that I don't
like.
Generic functions can have arguments other than dots.

Lets say you have an R package with something like:

print.myfunction (f, ...)
{   dosomething (f, ...)
}

Noting that I use function objects a lot.

R CMD check will generate a warning because you've named your object f
rather than x.

I don't want to name my object x.
I want to name my object f.
Naming the object x makes the program unreadable.
Especially if f contains an attribute or an argument named x.

There's a work around.
You can redefine the print function, using something like:

print = function (...) base::print (...)

However, you have to export and document the function.

I think that it would be better if generic functions didn't have any
arguments except for dots.

	[[alternative HTML version deleted]]



[Rd] WishList: Remove Generic Arguments
Abs Spurdle