July 2014 Archives

mop problem 5 - Role and C3 searching is not always necessary

I think Role and C3 searching is not always necessary.

Object orientation good practice I want to tell to newbies is single inheritance and delegation.

Role is multiple inheritance. Role can have attributes. This mean role have data, not only methods. I don't think this is good.

I think the reason making mop complex is Role and C3 searching.

If Role and C3 searching are none, BUILD, BUILDARGS, DEMOLISH, $self->next::method, and many complex things is no needed. And overriding new method is easy and $self->SUPER::foo work well.

I don't deny Role …

About Yuki Kimoto

user-pic I'm Perl Programmer. I LOVE Perl. I want to contribute Perl community and Perl users.