<br><br><div class="gmail_quote">On Thu, Oct 29, 2009 at 5:23 PM, Daniel Pittman <span dir="ltr">&lt;<a href="mailto:daniel@rimspace.net">daniel@rimspace.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Michael Potter &lt;<a href="mailto:megamic@gmail.com">megamic@gmail.com</a>&gt; writes:<br>
&gt; On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman &lt;<a href="mailto:daniel@rimspace.net">daniel@rimspace.net</a>&gt; wrote:<br>
&gt;&gt; Toby Wintermute &lt;<a href="mailto:tjc@wintrmute.net">tjc@wintrmute.net</a>&gt; writes:<br>
&gt;&gt;<br>
&gt;&gt; [...]<br>
&gt;&gt;<br>
&gt;&gt; &gt; In other news; I&#39;m liking Moose a lot, especially since the .9 release &gt;<br>
&gt;&gt; with all the built-in attributes and corresponding traits.. but I&#39;m &gt;<br>
&gt;&gt; curious to know what everyone else thinks of Moose.  &gt; &gt; It&#39;s evidently<br>
&gt;&gt; superior to Perl&#39;s existing OO framework, which has been &gt; showing it&#39;s age<br>
&gt;&gt; and tacked-on-afterwards feel for a long time..<br>
&gt;&gt;<br>
&gt;&gt; Well, Moose is pretty much just syntax sugar and convention, sitting over<br>
&gt;&gt; the top of the traditional Perl OO design.<br>
&gt;<br>
&gt; Err....no. Moose allows for idioms that are rarely if ever used in<br>
&gt; conventional Perl OO programming.<br>
<br>
Absolutely.<br>
<br>
&gt; For example composition/delegation, method currying, built in type<br>
&gt; definition and validation, attribute traits, roles, full meta-class<br>
&gt; reflection and so much more.<br>
<br>
...but all of those are *possible* with standard Perl OO, right?<br></blockquote><div><br></div><div>*anything* is possible in Perl5 OO. Even Moose ;-) </div><div><br></div><div>My point was Moose will encourage people to use idioms that they would otherwise probably never even hear of. I had never come across many of the concepts in Moose (such as method currying) that I now use on a daily basis in code that small, maintainable and light-years head of what I used to write. </div>
<div><br></div><div>Some features (like type validation or attribute declaration) are available in other modules or frameworks and commonly used, however others (like roles and traits) provide a new capability that completely change how you approach a problem with OO. Evil multiple-inheritance be gone with you!</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Method modifiers, composition and delegation, currying, type definition and<br>
validation all exist as distinct (and incoherent, and often annoying) modules.<br>
<br>
Even meta-class reflection is semi-possible, albeit terribly ugly and limited;<br>
Moose addressed that through establishing solid conventions rather than by<br>
altering the fundamentals of Perl OO.<br>
<br>
<br>
So, yes, these are different, and rarely used, but they are not changing the<br>
underlying tool — just making all these cool things accessible in a sane,<br>
useful and coherent way.<br>
<br>
<br>
&gt; Once you start programming in Moose you will adopt an entirely new way of<br>
&gt; thinking about OO programming that leaves old-school Perl OO in the dust.<br>
<br>
...yes, but you are *also* using &quot;traditional&quot; Perl OO at the heart of the<br>
thing, so your new Moose objects can work where &quot;traditional&quot; objects are<br>
expected.<br>
<br>
Heck, they even codified the process of extending an existing &quot;traditional&quot;<br>
object with Moose. :)<br>
<br>
<br>
Anyway, my point is that Moose is not distinct from traditional Perl OO: you<br>
don&#39;t have one or the other, you have both, with Moose making all the cool<br>
stuff available that traditional Perl OO made hard.<br>
<br>
        Daniel<br>
<br>
...and, believe me, I will be happy to never see the open-coded versions of<br>
composition and delegation, and to see the back of open-coded argument<br>
validation and processing when it finally gets there and Method::Signatures or<br>
whatever takes over.<br>
<font color="#888888"><br>
--<br>
✣ Daniel Pittman            ✉ <a href="mailto:daniel@rimspace.net">daniel@rimspace.net</a>            ☎ +61 401 155 707<br>
               ♽ made with 100 percent post-consumer electrons<br>
   Looking for work?  Love Perl?  In Melbourne, Australia?  We are hiring.<br>
_______________________________________________<br>
Melbourne-pm mailing list<br>
<a href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/melbourne-pm" target="_blank">http://mail.pm.org/mailman/listinfo/melbourne-pm</a></font></blockquote></div><br>