in reply to Philosophy of a "new" method
Should it be a barebones outline of the object?Even that's too much IMO.
I prefer my new methods to do nothing beside creating a blessed ref and returning it.
Separating object construction and object configuration makes MI much easier.
Of course, if you believe in monsters under your bed, you probably also subscribe to the "MI is scary, don't do it!" philosophy. But this is Perl, not Java. Not only is MI possible in Perl, the *language* doesn't place more hurdles in your way than it already does with OO in general. It's just the classical way of "let's have a method that starts with nothing, return a fully configured object" that makes MI harder than it should be.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Philosophy of a "new" method
by rastoboy (Monk) on Feb 04, 2011 at 15:07 UTC | |
by BrowserUk (Patriarch) on Feb 04, 2011 at 16:11 UTC | |
by JavaFan (Canon) on Feb 04, 2011 at 15:35 UTC |