[Rd] R-ints Argument Evaluation has out of date examples
richierocks at gmail.com
Sat Dec 24 00:24:53 CET 2016
In R-ints section 1.5
> Note that being a special/builtin is separate from being primitive
> or .Internal: quote is a special primitive, + is a builtin primitive,
> cbind is a special .Internal and grep is a builtin .Internal.
I think that the examples of cbind and grep might be out of date since
these both appear to be closures now.
In fact, as far as I can tell, all the special and builtin functions
now use the primitive interface. The following code returns an empty
list in R 3.3.2:
e <- as.environment("package:base")
vars <- mget(ls(e), e)
typeof(x) %in% c("special", "builtin") && Negate(is.primitive)(x)
Is it true to say that "being a special/builtin is separate from being
primitive on .Internal, however in practice all special and builtin
functions are primitive"?
More information about the R-devel