On using brackets in `setGeneric()`

In Advanced R, there is a suggestion about avoiding brackets ({}) in setGeneric():

It is bad practice to use {} in the generic as it triggers a special case that is more expensive, and generally best avoided.

I wonder if anyone has any detailed rationale about this suggestion. I searched it online and could not find any references except for this line in Advanced R 2nd ed. (it is not in the first edition, where brackets are used in the setGeneric() examples).

This topic was automatically closed after 45 days. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.