Skip to content

.Alias and memory

1 message · Brian Ripley

#
In part you are. That is equivalent to

attr(somecalc, "class") <- "whatever"

and whereas that happens to be how class<- is defined on S3 and R, it
is not how it works in S-PLUS 5 (although oldClass<- is currently
defined that way).  When you want to change to S-PLUS 5-style classes
you have to remember that you have subverted the system!

More generally, using the representation not the public method in
object-oriented programming is a recipe for disaster.