On Sat, Jul 31, 2010 at 02:36:02PM -0400, Brandon S Allbery KF8NH wrote: > On 7/31/10 14:23 , Carl Mäsak wrote: > > a. Allow this form of encapsulation breakage. > > b. Disallow detaching of certain methods. > > c. Disallow attaching of certain anonymous methods. > > > > I must confess I don't particularly like either option. I'm by no > > means an OO expert. It would be interesting to hear your views on > > this. > > 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. -sorear
signature.asc
Description: Digital signature