I have these bookmarked/tagged with oop and tye and in proximity to each other
How Large Does Your Project Have To Be to Justify Using Moose?,
Re^2: Two simple code style advice questions (tye)
module w/ object-oriented and functional interfaces: best practices?
Advice please on variable naming style in modules
Re: Object Oriented Orientation
encapsulation violation Re: Programming patterns Programming patterns
Moose class design for game

And tye in the cb around the same time( 2011-06-18 06:23:39 UTC )

the Moose will bite you in the end
The classic steps of bad OO design are done in the following order: 1) Figure out which classes inherit from which other classes, 2) Figure out the attributes of each class, 3) Starting writing methods.
ugh. data-type-based validation. If you want C++, you know where to find it. That's another thing Moose promotes that I find problematic.
So, Moose pretty much forces you to only use attributes via accessors (that it generates). This forces your attributes into public view and leads to classes with lots of accessors. Bad design.
Never inheritance! Though, you'll want simple delegation sometimes and there isn't a great solution for that yet (I'm working on it)
It leads to fragile and overly complex design for a ton of reasons.
The argument 'for' is that it can then be easy to muck with things in several rather unstructured ways. Rather like the argument for 'goto'. You don't have to bother to make the design structure clear. Just slap things however.
No, I think OO is great. Inheritance sucks big time.
Roles improve inheritance in some fairly superficial ways but don't fix the bad design aspects much if at all.
And my disagreement with Moose's take on OO is not anything about 'anal'. It puts way too much stress on accessors, encourages validation only via data types. It adds the worst aspects of C++ and doesn't implement many good, required parts
I don't mind having a good structure for doing OO. Moose got a lot of things right about that. But the negative still outweighs the good, IMO.
Every so often I have to go find some good old hackers and ask them if inheritance is good so they can laugh at me and remind me how stupid the old-timers realize it is. This knowledge is not only not shared by enough people, but ...

I also bookmarked https://metacpan.org/source/ZBY/WebNano-0.007/webnano_article.html/http://cpansearch.perl.org/src/ZBY/WebNano-0.007/webnano_article.html meaning to ask something about coupling controllers, but I don't remember

I also remember that tye is writing a oop/ood book(let?) , can't wait for 50 shades of tyed oops


In reply to Re^5: Moose: I want builder method to run every time I call an attribute (tyeoopood) by Anonymous Monk
in thread Moose: I want builder method to run every time I call an attribute by italdesign

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.