In general the internal implementations of the methods for class A should ignore the class of objects from class A completely. (I know, it sounds silly, but still. :)
In proper modern OO-ish languages like CLU from 1975, the methods get an unclass()-d object. This is the single best language feature I miss every day. It makes it completely clear where the API boundaries are.
I just pushed a fix. You can replace $ and [[ with .subset2() and get a small performance increase. But for $<- and [[<- (on an environment), you have to use assign(), which is slower. Fortunately, the assignment operators didn't turn up anywhere in the code (after the class is assigned to the object, and thus enabling dispatch to S3 methods).
For future reference (R 3.3.1 on Linux):
i<-1# Test speeds of $<- and assign(). Also increment i each time so that new values# are assigned
assign("x", (i<<-i+1), envir=e),
(i<<-i+1) # Find how much time is spent in incrementing i
# Unit: nanoseconds# expr min lq mean median uq max neval# e$x <- (i <<- i + 1) 902 992.0 1253.113 1072.5 1221.5 36127 1000# assign("x", (i <<- i + 1), envir = e) 1148 1270.5 1523.144 1339.0 1514.0 16897 1000# (i <<- i + 1) 321 344.0 419.003 353.0 383.0 11116 1000