[Melbourne-pm] Google Wave Anyone?
daniel at rimspace.net
Wed Oct 28 23:23:41 PDT 2009
Michael Potter <megamic at gmail.com> writes:
> On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman <daniel at rimspace.net> wrote:
>> 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 age
>> and tacked-on-afterwards feel for a long time..
>> Well, Moose is pretty much just syntax sugar and convention, sitting over
>> 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?
Method modifiers, composition and delegation, currying, type definition and
validation all exist as distinct (and incoherent, and often annoying) modules.
Even meta-class reflection is semi-possible, albeit terribly ugly and limited;
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 the
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: you
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 or
whatever takes over.
✣ Daniel Pittman ✉ daniel at rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
Looking for work? Love Perl? In Melbourne, Australia? We are hiring.
More information about the Melbourne-pm