-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2 Apr 2007, at 22:33, Andy Armstrong wrote:
See Class::Classless, Class::Prototyped and friends.
Sure.
I mean "Sure - that's prototyping alright" but I don't think it's
quite the same as what I'm talking about.
$base = SomeObject::new( { width => 10, font => 'Arial' } );
$wider = $base->variant( { width => 30 } );
$mono = $base->variant( { font => 'Monospace' } );
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
$handle -> [object]
it's
$handle -> [object + parameters]
and you can have
$handleA -> [objectA + parametersA]
$handleB -> [objectA + parametersB]
Same object, different parameters.
- --
Andy Armstrong, hexten.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)
iD8DBQFGEXjfwoknRJZQnCERAqcvAKCd1foUjotRwHSdPCT/pLu/f8bMRgCaApx8
LGA9v/ZeUdVL/LCS/LyrjOs=
=TewR
-----END PGP SIGNATURE-----