in reply to Re: When to Use Object Oriented approach in Perl? (RFC)
in thread When to Use Object Oriented approach in Perl? (RFC)
The only one of those I am not sure about is the natural hierarchy/inheritance one. The big problem is the LSP and often data that seems to follow a natural hierarchy (a square is a rectangle) in fact violates the LSP.
Inheritance is powerful but it is also very difficult to get right. On the other hand, one thing I really like about Moose is the fact that the roles and delegation systems provides a useful alternative to inheritance where what you really want to offer is a consistent interface.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: When to Use Object Oriented approach in Perl? (RFC)
by AppleFritter (Vicar) on Sep 05, 2014 at 09:43 UTC | |
by Arunbear (Prior) on Sep 06, 2014 at 14:41 UTC | |
by tobyink (Canon) on Sep 06, 2014 at 15:35 UTC |