-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 7/31/10 14:38 , Stefan O'Rear wrote: > On Sat, Jul 31, 2010 at 02:36:02PM -0400, Brandon S Allbery KF8NH wrote: >> The whole concept of detaching and attaching methods seems suspect to me; in >> particular, attaching a method from a class not declared to be related reeks >> of monkey patching. As such, I'd only allow it when monkey patching is >> enabled. > > Methods are just functions. > > $object.$method(@args) > > is simply sugar for > > $method($object, @args) > > so disallowing it is not quite that simple.
That would seem to make it worse (type conformability on the first positional parameter; does declaring a method not implicitly declare the type of its positional parameter to be the class that declared it, or a subclass thereof?) --- but I think you addressed that in your other response. - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAkxUbtAACgkQIn7hlCsL25WOkwCgvq2SevYoVtGWSio0q7lVDxWy Qt8AmM8FijA51vxGjylUwuCq1+zpF9k= =XroU -----END PGP SIGNATURE-----