user-pic

Sid Burn

  • About: I blog about Perl, C# and programming in general.
Subscribe to feed Recent Actions from Sid Burn

  • bor commented on Inheritance is Bad: Code Reuse Part I

    Please continue :)

  • Timm Murray commented on mop problem 5 - Role and C3 searching is not always necessary

    I can see why he's confused--in Perl, roles are often implemented via multiple inheritance under the hood. The other way to do it (off the top of my head) is to mess with the symbol table, which is a nastier solution.

    That's an implementation detail, though. The semantic details of roles avoid the problems we usually associate with multiple inheritance. It's not a particularly leaky abstraction; you can pretend you have no idea how the implementation actually works and you'll be fine.

  • Ovid commented on mop problem 5 - Role and C3 searching is not always necessary

    Roles are not multiple inheritance at all. In multiple inheritance, you're overloading class responsibility with code reuse and you introduce ordering problems (which C3 mitigates but does not solve).

    Roles leave responsibility to the classes, but handle the code reuse. Further, unlike inheritance, they don't have ordering issues, ambiguities become compile-time failures, and they can be mixed and matched in any order without breaking (well, that's actually traits; Moose roles miss a few objectives here, but only in corner cases). I strongly suggest you read up more about ro…

  • Stevan Little commented on mop problem 5 - Role and C3 searching is not always necessary

    C3 will not be part of the MOP, it is part of the core of Perl already, it will be possible for a user of the MOP to use C3 just as it is possible for a user to do that with regular Perl OO.

    Roles are not multiple inheritance and in the MOP will not be implemented with multiple inheritance. You should do some reading up on Roles and how they work, I fear you do not understand them well enough.

  • xmikew commented on Method Privacy in Perl

    I got really caught off guard by:

    They don't need to be documented. Rather, they need to be urinated on to mark your territory.

    The post was heavy then I hit that line and had to laugh. Thanks, good way to start off the day

Subscribe to feed Responses to Comments from Sid Burn

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.