On Mon, Apr 02, 2007 at 22:42:54 +0100, Andy Armstrong wrote:

> I explicitly don't want $wider and $mono to be /clones/ of $base - I want 
> them to /be/ $base but with modified parameters. Semantically it behaves as 
> if an instance handle ($base, $wider, $mono) binds 
> parameters to an object so instead of

Proto based OO usually does not imply cloning, but a linked list
lookup chain thingy, where props in the derived object shadow ones
in the ancestor, but modification to the ancestor will reflect in
all the children.

If you want this for testing Test::MockObject::Extends works well,
if you want it for real code I guess you could cannibalize that, but
I doubt you'll find this as a pattern anywhere else because most
languages that have a pattern naming culture lack the flexbility to
do these tricks

-- 
  Yuval Kogman <[EMAIL PROTECTED]>
http://nothingmuch.woobling.org  0xEBD27418

Attachment: pgpQZlze1k6mR.pgp
Description: PGP signature

Reply via email to