[Melbourne-pm] Google Wave Anyone?
megamic at gmail.com
Wed Oct 28 23:41:41 PDT 2009
On Thu, Oct 29, 2009 at 5:23 PM, Daniel Pittman <daniel at rimspace.net> wrote:
> Michael Potter <megamic at gmail.com> writes:
> > On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman <daniel at rimspace.net>
> >> Toby Wintermute <tjc at wintrmute.net> writes:
> >> [...]
> >> > In other news; I'm liking Moose a lot, especially since the .9 release
> >> with all the built-in attributes and corresponding traits.. but I'm >
> >> curious to know what everyone else thinks of Moose. > > It's evidently
> >> superior to Perl's existing OO framework, which has been > showing it's
> >> and tacked-on-afterwards feel for a long time..
> >> Well, Moose is pretty much just syntax sugar and convention, sitting
> >> the top of the traditional Perl OO design.
> > Err....no. Moose allows for idioms that are rarely if ever used in
> > conventional Perl OO programming.
> > For example composition/delegation, method currying, built in type
> > definition and validation, attribute traits, roles, full meta-class
> > reflection and so much more.
> ...but all of those are *possible* with standard Perl OO, right?
*anything* is possible in Perl5 OO. Even Moose ;-)
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
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!
> Method modifiers, composition and delegation, currying, type definition and
> validation all exist as distinct (and incoherent, and often annoying)
> Even meta-class reflection is semi-possible, albeit terribly ugly and
> Moose addressed that through establishing solid conventions rather than by
> altering the fundamentals of Perl OO.
> So, yes, these are different, and rarely used, but they are not changing
> underlying tool — just making all these cool things accessible in a sane,
> useful and coherent way.
> > Once you start programming in Moose you will adopt an entirely new way of
> > thinking about OO programming that leaves old-school Perl OO in the dust.
> ...yes, but you are *also* using "traditional" Perl OO at the heart of the
> thing, so your new Moose objects can work where "traditional" objects are
> Heck, they even codified the process of extending an existing "traditional"
> object with Moose. :)
> Anyway, my point is that Moose is not distinct from traditional Perl OO:
> don't have one or the other, you have both, with Moose making all the cool
> stuff available that traditional Perl OO made hard.
> ...and, believe me, I will be happy to never see the open-coded versions of
> composition and delegation, and to see the back of open-coded argument
> validation and processing when it finally gets there and Method::Signatures
> whatever takes over.
> ✣ Daniel Pittman ✉ daniel at rimspace.net ☎ +61 401 155
> ♽ made with 100 percent post-consumer electrons
> Looking for work? Love Perl? In Melbourne, Australia? We are hiring.
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Melbourne-pm