> # Non S4
> compare(new("A", x = "1"), 1)
`old` is an S4 object of class <A>
`new` is a double vector (1)

> compare(new("A", x = "1"), globalenv())
`old` is an S4 object of class <A>
`new` is an environment

> compare(new("A", x = "1"), factor("x"))
`old` is an S4 object of class <A>
`new` is an S3 object of class <factor>

> # S4
> compare(new("A", x = "1"), new("A", x = "1"))
v No differences

> compare(new("A", x = "1"), new("A", x = "2"))
`old@x`: "1"
`new@x`: "2"

> compare(new("A", x = "1"), new("B", x = "1"))
`is(old)`:     "A"
`is(new)`: "B" "A"

> # S4 with extra attributes
> new <- old <- new("A", x = "1")
> attr(new, "bar") <- 2
> compare(new, old)
`attr(old, 'bar')` is a double vector (2)
`attr(new, 'bar')` is absent

