v0.2.0
"In Bloom"
Major Changes
-
Primitives are now more consistently handled, allowing them to be reassigned like any other function object. Prior to these enhancements, primitives would only be used for calls to specifically named symbols.
f <- paste f("a", c("b", "c")) # [1] "a b" "a c"
-
A call stack with proper call frames is now added, paving the way for improved error messages and the implementation of R's metaprogramming tools.
You can view the call stack by introducing a
callstack()
call:f <- function(...) list(..., callstack()) f("Hello, World!") # [[1]] # [1] "Hello, World!" # # [[2]] # [[2]][[1]] # f("Hello, World!") # # [[2]][[2]] # list(..., callstack()) # # [[2]][[3]] # callstack()
-
Even more primitives now implemented! This release brings
paste()
andcallstack()
(akin to R'ssys.calls()
)
Behind the Scenes
- Primitives are now all implemented as
dyn Primitive
objects, implementing aCallable
trait. They still don't have a proper standard library namespace, and are discovered only if not found in the environment (or its parents), but this paves the way for treating primitives more like user-defined functions.