"Organizing programs without classes"
"J. Baltasar García Perez-Schofield"
jgarcia at ei.uvigo.es
Mon Nov 10 10:35:58 UTC 2003
Hi, there !
I've been studying this paper in the weekend, and, although I've
found many things interesting, I can't understand the example which is
presented at the beginning of the paper.
It's said that "polygon traits" wold hold the draw() and copy()
methods, while the "prototypical polygon" would hold the parent attribute,
and the "vertices" attribute (BTW, how an attribute is marked in self as a
My question is: How's that possible ?
I mean, if the "draw" method is declared in the parent "traits",
then it has no access to the vertices list, as they are declared in the
"prototype". So it is impossible to write a complete "draw" method.
I suppose the list of vertices is declared in the "traits" object,
at least in a minimalist way, and then repeated in its full format in the
Or perhaps the "draw" method in the traits object is an empty one,
and the method is repeated in the polygon prototype object.
PBC - J. Baltasar García Perez-Schofield
Dep. Informática, Universidad de Vigo, España (Spain)
More information about the Self-interest