I've just been reading through some academic papers by Tom Mens.

The paper at this link looks interesting, as it appears to me to 
describe a problem that is addressed in Zope by acquisition wrappers.


Most object-oriented languages provide a self pseudo variable that 
serves two purposes: invoking methods through self sends and returning a 
self reference. Current formal models capture this behaviour by 
introducing a self parameter that fulfils both roles. We will show that 
this double functionality is incompatible with object-based 
encapsulation. Moreover we will point out that the separation of both 
functionalities is needed in type systems. We propose a formal model 
based on a primitive self send construct, and present its denotational 
semantics. A self reference is implemented through a self send instead 
of the other way around. This model is extended formally with an 
object-based encapsulation mechanism. It allows us to keep inheritance, 
encapsulation and typing orthogonal. This way we obtain a flexible and 
incremental software development scheme.

In the case of Zope, the "self sends" are represented by the way an 
acquisition wrapper dispatches messages. The "self reference" is given 
by aq_base (or one of the other aq_ attributes, depending on what you 
want "self" to mean at the time).

Steve Alexander
Software Engineer
Cat-Box limited

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to