in reply to Moose - my new religion
Maybe it's just me, but what exactly is modern about Moose? To me, it feels a bit like i've been thrown back in time to when i was programming in C++. For me it feels like it is limiting the potential of a program by defining restricted interfaces.
I always felt that C++ and Java OO always tried to force me into a confined space where only things are possible that the original developer of a class felt necessary. Yeah, i realize that this may or may not be a good thing, depending on what you are trying to accomplish.
For me, using the Perl 5 native OO actually feels like i have been released from a prison camp. I don't have to overload objects or have my local, modified copy of a Perl module just because the long-gone author of that module forgot to close a file. I just wadd a single line of code like $broken->{infile}->close() and be done with it. Makes - in my opinion - for a much more readable code and is easier to debug than having to step through multiple parent classes.
Last time i tested it (quite some time ago), Moose also had a terrible, unacceptable performance penalty that prohibited me from using it on our production servers.
As i said, this is my personal opinion, this may differ if i where in a big development team and/or had much more server resources available. But as it stands now, in a developer team of one, for me Moose does not make sense at all...
Disclaimer: There is of course the chance i misunderstood completly how Moose works. But then again, i'm quite happy with the "classic Perl 5 OO", so i didn't invest weeks and weeks of learning Moose in exquisite detail.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Moose - my new religion
by tobyink (Canon) on Jan 08, 2012 at 12:49 UTC | |
by cavac (Prior) on Jan 08, 2012 at 16:00 UTC |