develooper Front page | perl.perl5.porters | Postings from March 2011

What does this convey about Moose and CPAN? (Re: Revising Perl'sOO docs - a new OO tutorial)

Thread Previous | Thread Next
Peter Rabbitson
March 5, 2011 03:41
What does this convey about Moose and CPAN? (Re: Revising Perl'sOO docs - a new OO tutorial)
Message ID:
Peter Scott wrote:
> On Fri, 04 Mar 2011 17:40:05 -0600, brian d foy wrote:
>> In article <>, Peter
>> Scott <> wrote:
>>> (1) The most commonly agreed best practice O-O framework is Moose.
>>>     Here's how to use it.
>> I don't think you can support this statement. A very small slice of
>> Perlers know what Moose is and like it. A slightly larger slice know
>> that it exists but don't use it yet. Most people have never heard of it,
>> just like most Perlers don't use most of Perl's features.  There's a bit
>> of echo chamber there.
>> That's nothing against Moose or its future. Let's just not misrepresent
>> it.
> I don't think it's misrepresenting.  The fact that most people using Perl 
> don't know what Moose is doesn't alter the fact that among people who have 
> the knowledge to make an informed choice, the most common choice *now* is 
> Moose.
> Look at it this way.  Is the best practice to use some other framework, if 
> so, which one?  Is the best practice to use *no* framework?  Hardly.  The 
> most *common* practice is probably no framework, but our job is to educate 
> people as to the *best* way to do things, not regurgitate the 
> underinformed choices of the majority back to them.

There is best practice and there is best practice. I am horrified by the
idea that Moose can (already is) becoming a staple of many dependency
chains. I have nothing against people using Moose in their personal work,
but do realize that by giving extra core(!) endorsement to Moose you are
also giving a nod towards "hardware is cheap, we declare the season of
CPAN Moosification open".

Of course you might be wondering "well, what's wrong with that?" - the
wrong starts the moment you leave the web-dev echo-chamber. The liberal
(ab)use of *runtime* types actively encouraged by Moose more or less
guarantees that your data will be examined N times in an identical way when
traversing your lovely stack of neatly connected CPAN pieces. No matter how
fast is your choice of iron, N checks will always suck N times more.

So please think about the extra implications/dangers of making sweeping
statements "Moose is the way to go" - it often isn't (in my line of work it
in fact *never* is, to a point where I am contemplating Test::NoMoose to
catch Moosification of my dependencies)

> A best practice isn't necessarily one that enjoys a large popular 
> following, only that the people writing the documentation come to a 
> consensus that it is so.  Among the people who influence the 
> documentation, I contend that Moose is considered the best O-O framework 
> by a clear majority, over any other framework or none at all.
> By all means, let's not state that Moose is used by the majority of Perl 
> programmers, that would be very wrong.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About