Hi Jim, On Tuesday 01 Feb 2011 17:03:03 James Eshelman wrote: > There've been fairly frequent references to and praises for Moose on this > list. After reading some of the doc and discussion of it, I'm still > wondering about a couple points: > > - Would it be accurate to say that using Moose will save you coding time > (on a large project, after learning it) but cost you significant runtime? > Always, sometimes, never? [Of course the frequent comment over the years > on this list is that if RT performance is paramount then don't use O-O > perl at all. Probably still true, but assume O-O perl is a given.]
Well, from what I understood using Moose will cost you some loading/startup cost, but after the program started should run as fast as Perl OOP code using Class::Accessor or similar. If you use http://search.cpan.org/dist/MooseX-Declare/ or similar, it may imply an even additional compilation-time cost. I recall that the Ita2heb's (a Perl module I contributed to that transliterates Italian to Hebrew) test suite ran considerably slower after we converted it to use Moose (though we converted everything to Objects starting with Moose in the first place, so it's hard to know), in part because it had several tests. Also see: http://www.nntp.perl.org/group/perl.moose/2010/10/msg1950.html > > - What valuable O-O feature(s) does Moose provide (if any) that couldn't be > coded by a skilled programmer in perl? [There's some C > programming/symbol table manipulation under the covers?] > Moose makes use of some XS code, but a lot of its feature set probably can be coded by a skilled enough Perl programmer. However, it will take some time to re-implement the Moose wheel and it provides a lot of nifty and convenient features that can save you a lot of time. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Interview with Ben Collins-Sussman - http://shlom.in/sussman Chuck Norris can make the statement "This statement is false" a true one. Please reply to list if it's a mailing list post - http://shlom.in/reply . _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

