Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^4: Modern vs postmodern?

by stvn (Monsignor)
on Aug 11, 2009 at 16:22 UTC ( [id://787686] : note . print w/replies, xml ) Need Help??

in reply to Re^3: Modern vs postmodern?
in thread Modern vs postmodern?

Not the most useful for funky cli trick scripts ... but then.. Paul Graham (who's actually a lisp hacker.. ) has some interesting arguments about coder time vs cpu time

True, and for a lot of programs the couple of seconds extra that Moose and the classes written in Moose will take will be nothing compared to the 20 minutes it takes to parse that log file, or 10 second it takes to download that web page, etc etc. As with everything in life, there are tradeoffs and you eventually have to pick you battles.

I gotta tell ya, the use of Moose is radical enough that with it.. I would argue you're not writing perl anymore. (Nothing wrong with that!)

Well, your certainly not writing Perl 5 OO anymore yes, but aside from a few new "keywords" vanilla Moose is still very much Perl 5. Now if you throw in MooseX::Declare and Moose::Autobox, then yes, your into a new world there, but those are both optional :)

Perhaps there is discussion on, should Moose be native to perl?

People mumble about putting Moose in core every once in a while, put frankly I don't want the problems that go along with that (dual life-ing, etc). There is some fiddling about for Perl 5.12 about including some level of Moose and the MOP into the interpreter itself, but more likely it will be a subset of the MOP enough that it makes Moose faster and still allows others to do OOP the old way if they want.

Maybe this is the way that perl should implement OO- is that a stretch?

Well I stole a bunch of it from Perl 6, and MooseX::Declare is bringing the syntax of things even closer. But in the end TIMTOWTDI is too strong in Perl culture (which is a good thing) and not everyone loves the Moose.

I mean.. If we open a book that teaches perl, and the OO section comes up, should it just teach Moose? (Not a rhetorical question.)

This is exactly what the new Catalyst book does (kinda). As for future Perl books, well you will have to convince someone to publish one, after all, Perl is dead ;)

I have some concerns about .. the development of perl addresses some of the issues that Moose does- is this incorrect? If so.. Should we not trust the development of perl over the development of Moose? (It's also possible that this last, is not an important issue. As the world is evolving rather quickly.)

Well, the core Moose hackers are close to and in cases even overlapping with, the p5p crowd enough that I don't think you need to worry about that. Any future perl features that overlap with Moose features will either be intentional (collaboration between the p5p and Moose groups) or be addressed in Moose early enough that you will never know it happened. In fact, we were using the 5.10 MRO features very shortly after 5.10 came out with seamless backcompat (thanks to MRO::Compat).