> 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)
`x` is an R6 object of class <goofy>
`y` is a double vector (1)

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

> compare(goofy$new(1), factor("x"))
`x` is an R6 object of class <goofy>
`y` 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"))
`x$x` is a double vector (1)
`y$x` is a character vector ('a')

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

`x` is length 3
`y` is length 4

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

`x$y` is absent
`y$y` is a double vector (10)

