Skip to content
Prev 247223 / 398503 Next

Method dispatch for function call operator?

The details here are much more appropriate for R-devel, but please 
check the help pages for "(" and "[", and note

- "[" is generic and "(" is not.
- the primitive `(` is used to implement constructions such as
(x <- pi) and not x(...).

The special handling of operators such as "[" is part of the parser, 
and you are guessing incorrectly how function calls are parsed.

(Note to Duncan Murdoch whose reply came in whilst I was writig this: 
"(" is essentially a no-op, but it does turn visibility on, something 
often used with assignments.)
On Thu, 13 Jan 2011, Taras Zakharko wrote: