Re^4: Beyond Inside-Out (details)by Anno (Deacon)
|on May 29, 2007 at 15:57 UTC||Need Help??|
Yes, a much simpler and more direct solution to some of the problems that "inside-out" objects are being promoted to address1.
Yes, that's similar with one important difference: In your implementation, the object proper is its corona (a hash). The way I have it in Alter, the object itself can be whatever it is, the corona is attached via magic, and accessed through the magical ego() function.
That leaves the possiblity for the object proper (the "carrier") to be whatever it needs to be to support a conventional class. That answers the question of mixed inheritance. Like with inside-out, any class can inherit from an Alter-based class, and in reverse, an Alter-based class can inherit (without further ado) from one conventional class. Both work by making the conventioonal object the carrier.
As for method-borrowing, a la
why, yes, the borrowed method would continue to access the alter ego that was established in Bar. That's what I would expect in any case.
As to the more general problem of the various meanings of caller, if I'm not mistaken what I'm using is the package that was in force when the call to ego() was compiled. That is excatly what I want: Mehods compiled in a class access the alter ego specific to that class, and that's the only way.