Hi all! [ I'm writing this email from a different address (with a typo of Schrödinger's name) because I've encountered the following email problem:
http://use.perl.org/~Shlomi+Fish/journal/36545 . Sorry for the inconvenience. ] I previously wrote the following email: http://www.nntp.perl.org/group/perl.moose/2008/05/msg179.html ( "Shlomif's Tenth Law of Perl OOP"). I said that I'd like to convert Test-Run to Moose. Well, now I'm in the midst of the translation - many tests fail, but the problem is that the tests now run much more slowly. It is a noticable difference, that makes running the tests unbearable. The problem as I see it is that I'm using Plug-ins instead of Roles and that I didn't finalise the class. Of course, I'd rather not finalise the class, or ditch away plug-ins. And naturally, Moose is also making many run-time checks that are not present in my old Class-Accessor and are not really necessary for me. As much as I appreciate type-checking for instance members, I'm disciplined enough for it not to matter much. So Moose seems impressive, but an overkill for Test-Run's needs. In regards to the original Greenspun rule ( http://en.wikipedia.org/wiki/Greenspun's_Tenth_Rule ), it reads: {{{{{{{ Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp. }}}}}}} Indeed from my experience doing C programming, I saw many times where C programmers (including me) invented wheels. However, often, especially in open-source projects or high-quality commercial applications, they invent extremly good wheels, which are better than commodity wheels. Ad-hoc implementations, but still high-quality ones. In http://fc-solve.berlios.de/ for example, I have a memory pool implementation, an allocator, an ad-hoc hash, a priority queue, and a lot of other code. However, when looking at the memory pool implementation of APR, I noticed it was much more bloated than the one I used, and such probably slower. What I wrote was not good enough for Apache, but it was better for me. My hash was also faster than the GLib hash, and since then I incorporated many further optimisations. So the original sentence may sometimes read: {{{{ Any suficiently complicated, but high-quality, C program contains an ad-hoc but very robust and fast implementation of half of Common Lisp. }}}} So unless Moose will become faster, I won't be able to use it in Test-Run, and will have to rely on Class-Accessor and the additional logic I've built on top of it. From what I've heard of CPython, they often re-implemented Python libraries code in C to make them faster. Perhaps the Perl world should follow suit. Regards, Shlomi Fish