[Rd] Status of reserved keywords and builtins

Hadley Wickham h.wickham at gmail.com
Fri Dec 13 14:59:24 CET 2013


>> It would have those benefits, but it would be harder to prototype
>> changes by actually replacing the `if` function.  Implementations that
>> want to optimize the calls have other ways to do it, e.g. the sorts of
>> things the compiler does.
>>
>
> Does anyone actually prototype changes to the `if` function?

I do - in the dplyr package (https://github.com/hadley/dplyr), I
construct environments where many of the most common R functions are
replaced by alternates that return SQL strings. This makes it possible
to use R's parser, while translating output into another language. I
think it's a pretty elegant approach that's facilitated by lexical
scoping and first-class environments, but it's an admittedly rare
case.

Hadley

-- 
http://had.co.nz/



More information about the R-devel mailing list