A
anno4000
I'd like to draw the attention of the group to a writeup of mine
on perlmonks: http://www.perlmonks.org/?node_id=617945
It is about an alternative to the inside-out technique of class
implementation that, I believe, is as powerful in enabling
inheritance, but easier to handle. It comes in the form of
a module named Alter, a preliminary implementation of which
is available at
http://www.tu-berlin.de/zrz/mitarbeiter/anno4000/alter/
Alter exports a function named ego(), which is used to associate
(set and retrieve) an independent piece of data with each object.
The salient point is that the result of the call Alter::ego( $object)
doesn't only depend on $object, but also on the calling class.
Thus, different classes can maintain different views of each
object without getting in each other's way.
Unlike inside-out classes, Alter-based classes don't need extra
support for garbage collection and thread cloning. Like inside-
out, they do need help in serialization. The standard modules
Data:umper and Storable don't do anything for them. It seems
possible to provide general inheritable methods for Alter-based
objects to handle these things. This is also something that is
hard to do with inside-out classes.
Anno
on perlmonks: http://www.perlmonks.org/?node_id=617945
It is about an alternative to the inside-out technique of class
implementation that, I believe, is as powerful in enabling
inheritance, but easier to handle. It comes in the form of
a module named Alter, a preliminary implementation of which
is available at
http://www.tu-berlin.de/zrz/mitarbeiter/anno4000/alter/
Alter exports a function named ego(), which is used to associate
(set and retrieve) an independent piece of data with each object.
The salient point is that the result of the call Alter::ego( $object)
doesn't only depend on $object, but also on the calling class.
Thus, different classes can maintain different views of each
object without getting in each other's way.
Unlike inside-out classes, Alter-based classes don't need extra
support for garbage collection and thread cloning. Like inside-
out, they do need help in serialization. The standard modules
Data:umper and Storable don't do anything for them. It seems
possible to provide general inheritable methods for Alter-based
objects to handle these things. This is also something that is
hard to do with inside-out classes.
Anno