<br><br><div class="gmail_quote">On Thu, Oct 29, 2009 at 5:23 PM, Daniel Pittman <span dir="ltr"><<a href="mailto:daniel@rimspace.net">daniel@rimspace.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Michael Potter <<a href="mailto:megamic@gmail.com">megamic@gmail.com</a>> writes:<br>
> On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman <<a href="mailto:daniel@rimspace.net">daniel@rimspace.net</a>> wrote:<br>
>> Toby Wintermute <<a href="mailto:tjc@wintrmute.net">tjc@wintrmute.net</a>> writes:<br>
>><br>
>> [...]<br>
>><br>
>> > In other news; I'm liking Moose a lot, especially since the .9 release ><br>
>> with all the built-in attributes and corresponding traits.. but I'm ><br>
>> curious to know what everyone else thinks of Moose. > > It's evidently<br>
>> superior to Perl's existing OO framework, which has been > showing it's age<br>
>> and tacked-on-afterwards feel for a long time..<br>
>><br>
>> Well, Moose is pretty much just syntax sugar and convention, sitting over<br>
>> the top of the traditional Perl OO design.<br>
><br>
> Err....no. Moose allows for idioms that are rarely if ever used in<br>
> conventional Perl OO programming.<br>
<br>
Absolutely.<br>
<br>
> For example composition/delegation, method currying, built in type<br>
> definition and validation, attribute traits, roles, full meta-class<br>
> 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>
> Once you start programming in Moose you will adopt an entirely new way of<br>
> thinking about OO programming that leaves old-school Perl OO in the dust.<br>
<br>
...yes, but you are *also* using "traditional" Perl OO at the heart of the<br>
thing, so your new Moose objects can work where "traditional" objects are<br>
expected.<br>
<br>
Heck, they even codified the process of extending an existing "traditional"<br>
object with Moose. :)<br>
<br>
<br>
Anyway, my point is that Moose is not distinct from traditional Perl OO: you<br>
don'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>