> goofy <- R6::R6Class("goofy", public = list(initialize = function(x) self$x <-
+ x, x = 10))
> froofy <- R6::R6Class("froofy", inherit = goofy, public = list(y = 10))
> # Non R6
> compare(goofy$new(1), 1)
`old` is an R6 object of class <goofy>
`new` is a double vector (1)

> compare(goofy$new(1), globalenv())
`old` is an R6 object of class <goofy>
`new` is an environment

> compare(goofy$new(1), factor("x"))
`old` is an R6 object of class <goofy>
`new` is an S3 object of class <factor>

> # R6
> compare(goofy$new(1), goofy$new(1))
v No differences

> compare(goofy$new(1), goofy$new("a"))
`old$x` is a double vector (1)
`new$x` is a character vector ('a')

> compare(goofy$new(1), froofy$new(1))
`class(old)`:          "goofy" "R6"
`class(new)`: "froofy" "goofy" "R6"

`old` is length 3
`new` is length 4

`names(old)`:     "x" "clone" "initialize"
`names(new)`: "y" "x" "clone" "initialize"

`old$y` is absent
`new$y` is a double vector (10)

