If you like meta object hackery and large, antlered beasts, then boy
have I got a treat for you. I mentioned this at the meeting and was
surprised that nobody had heard of it.
"Moose is a postmodern object system for Perl 5..." is one way to
explain it. I call it "a MOP derived from the design of Perl 6". It
has its drawbacks in memory usage and startup time (though both have
improved) but many users are deploying it in production code.
http://www.iinteractive.com/moose/
--Eric
--
The reasonable man adapts himself to the world; the unreasonable man
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.
--George Bernard Shaw
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
>Any chance we can just stay with Perl 4? ;-)
Feel free to install /usr/bin/perl4 and go nuts with it. Me, I'll be
bumping the minimum version of several of my CPAN modules to 5.10 and
using the //= operator, switch feature, plus perhaps the pluggable
regexp engine.
http://search.cpan.org/perldoc?Regexp::Grammars
Too much perl 4 code keeps masquerading as Perl code IMO.
<rant>Meanwhile, 5.10 has been in Debian stable for over a year now,
perl 5.12 is on its way, and people still seem to think that we CPAN
authors have some reason to be compatible with 5.6 or something.</rant>
--Eric
--
But as soon as you hear the Doppler shift dropping in pitch, you know
that they're probably going to miss your house, because if they were on
a collision course with your house, the pitch would stay the same until
impact. As I said, that one's subtle.
--Larry Wall
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
There is also an implementation of Moose in JavaScript called Joose:
http://code.google.com/p/joose-js/
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are sub...
But after you said that it was slow and a memory hog I kind'a lost
interest... I think I'll wait for the Perl 6 implementation ;-)
Phil
Thanks for the heads up Jessie. Do you know if they've apprehended the
perpetrators yet, or are they still at large?
-- Markus
>But after you said that it was slow and a memory hog I kind'a lost
>interest... I think I'll wait for the Perl 6 implementation ;-)
I didn't say it is slow. I said it has a startup penalty (about 0.5s --
or 0.2s on a warm disk cache.) The bare memory overhead is about 18MB
(on top of perl's 11MB.)
Currently, a substantial class hierarchy like Chart::Clicker uses about
90MB total and takes 1.5s to load from a warm disk. This could
probably be improved by adding some lazy evaluation in strategic places
but most of the current Moose developers seem to be deploying in
persistent environments.
At runtime, it's as fast as any other perl OO depending on how much
validation code you're using. Slower than "blazing fast and loose"
hash key access, but probably still faster than ruby and definitely
faster than the current rakudo perl 6.
I hear there's a local project that allows you to benchmark analogous or
alternative solutions between multiple language interpreters
(http://github.com/notbenh/tool_bench -- angry pink unicorns
notwithstanding.)
--Eric
--
Human beings are relatively simple. You just reward them for something
and they will do it.
--William Cohan
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
1. Faster than Ruby 1.9?
2. Ouch! Why is Rakudo Perl 6 so slow?
> I hear there's a local project that allows you to benchmark analogous or
> alternative solutions between multiple language interpreters
> (http://github.com/notbenh/tool_bench -- angry pink unicorns
> notwithstanding.)
These aren't the unicorns that fart glitter, are they?