just look at like the last 2/3rds of Damians OO book, it is full of overly clever tricks that should never be done in the real world. At some point people just need to get work done.
Maybe it's been a while since you actually read Damian's OO
book, because that's not how it seems to me.
Of the 14 chapters, the first two give good general introductions to the
concepts of OO and the bits of Perl you need to understand to understand
OO Perl. The nest five explain the basic way Perl OO works (though
Chapter 5--on blessing non-hashes--has a lot of stuff that most
developers would never need). Chapter 8 explains two outdated approaches
to class creation (i.e. earlier and more easily understood versions of
what Moose does now). Chapter 9 explains ties (which certainly are
overly clever). Chapter 10 looks at operator overloading (and the last
third of the chapter actually counsels against clever tricks). Chapter
11 covers several outdated approaches to encapsulation (which I know you
don't consider important, but some of us do). Chapter 12 works through a
simple example of polymorphic design. Chapter 13 looks at multiple
dispatch (a "trick" so useful that it's now fundamental to, and used
everywhere in, Perl 6). The final chapter shows a whole lot of
definitely overly clever tricks for creating object persistence
So there are clearly "overly clever tricks" in chapters 9 and 14, and
arguably some in parts of chapters 5, 11, and 13. By my count that's
about 100 pages out of 490, or around 20%.
Instead of 2/3 of the book being wrong-headed, it seems to me that
the first 40% of it is an good solid introduction to the way OO Perl
actually works; and that most of the rest of consists of useful, but non-essential, explanation too.
Not bad for a book written
a decade ago.
Personally, I'd rather have developers who have read Damian's OO book and
therefore understand the underlying Perl OO mechanisms that Moose uses (or
sometimes replaces), than have developers who don't understand how Perl OO actually works and just treat Moose as a
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||