Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: The speed of blessed hashrefs, the power of Moose - how to get both?

by Anonymous Monk
on Nov 20, 2011 at 00:19 UTC ( [id://939015]=note: print w/replies, xml ) Need Help??


in reply to The speed of blessed hashrefs, the power of Moose - how to get both?

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: The speed of blessed hashrefs, the power of Moose - how to get both?

Replies are listed 'Best First'.
Re^2: The speed of blessed hashrefs, the power of Moose - how to get both?
by derby (Abbot) on Nov 20, 2011 at 15:10 UTC

    Object orientation is programmer masturbation, a passing fad, and truly a bad idea that really does make programmers blind.

    Yikes! I'm not sure I would call 40+ years of OO (17+ for perl5) a 'passing fad.' Excessive self-gratification, sure at times, but that's true with any language or style (Java, C++, procedural, functional, etc). In my experience, the language and/or technology is rarely a problem (give me the right assembly programmers and I can rule the world). Just like Eddie Wilson said it's 'words and music,' for us it's 'developer and tool.' The right pairing is a thing of beauty and the wrong pairing is destined for the unemployment line and the waste heap of history.

    -derby

      give me the right assembly programmers and I can rule the world

      You're a bit late. They already do rule the world (of computing). It's all that low-level stuff that turns your computer on when you press that power button... ;-)

      Just like Eddie Wilson said it's 'words and music,' for us it's 'developer and tool.' The right pairing is a thing of beauty and the wrong pairing is destined for the unemployment line and the waste heap of history.

      I fully agree to that statement. While a good developer can use any programming language, only the right language - matched to the developers mindset and the given problem - will lead to an elegant solution.

      Don't use '#ff0000':
      use Acme::AutoColor; my $redcolor = RED();
      All colors subject to change without notice.
      The problem is how it's been promoted as the be all and end all, all singing all dancing way of programming. Managers who don't know any better actually believe that crap!

      Sure sometimes using OO can be useful, I'm struggling to think of an occasion, but I'm sure there are examples.

      I still think it's a passing fad, and Q.I.S will have nothing to do with it.
Re^2: The speed of blessed hashrefs, the power of Moose - how to get both?
by jdrago999 (Pilgrim) on Nov 20, 2011 at 02:15 UTC

    "One of these days you lot are going to learn that sometimes the simplest answer is infact the best, that all these high-faluting technical wizardry incantations do nothing but slow Perl down by trying to make it be something that it was never intended to be, nor will it ever be."

    Please re-read my post. I'm just looking to discuss performance - maybe there's something I've missed, or some kind of modifier or something like that. Can Moose be fast, *and* powerful at the same time?

      The short answer is "no".

      You've stumbled upon one of the reasons why Larry abandoned Perl 5 development over a decade ago.

      Moose, Mo, et al are very nice, but they are fundamentally kludgey bolt-on's intended to make the kludgey bolt-on that is P.OOP, look a bit nicer.

      Perl was never intended to be used like that, and it's only the sheer power of modern hardware that allows us to get away with it while we wait for Larry and co to finally ship Perl 6 which has been designed from the ground up to support such things.

      As far as I know after 11 years of work by most of the top minds in Perl, we are yet to see a version of it that is capable of compiling all of it's own syntax or running at a speed greater than a 1 legged, cross eyed saint Bernard.

      And of course whilst they are all busy doing that, and the next tier down of top minds are busy trying to make Perl 5 pretend it's Perl 6, the rest of the Perl world are left to struggle on by themselves and make the best they can of the situation.

      Such a shame as well, you see all the employers asking for all the latest buzzwords, and I bet you not one in 10 of them really understand why they want those buzzwords, just that they are the latest buzzwords and therefore they are probably good. They are shooting themselves in the foot in terms of performance and scalability without even realising it.

Re^2: The speed of blessed hashrefs, the power of Moose - how to get both?
by chromatic (Archbishop) on Nov 20, 2011 at 06:58 UTC
      moose : 67476/s hashref : 724638/s
      724638 / 67476 = 10.739 = deci-mated.
      And what does it bring us, in real terms?

        I can neologize with the best of them too, but I often choose to use the normal definitions of words to communicate my thoughts accurately to other people.

        And what does it bring us, in real terms?

        My IO bound programs are a lot shorter, easier to read, and more correct. That seems fair. (I could write my IO bound programs in C instead, but the same reasoning applies. There's only so fast you can block on an epoll loop.)


        Improve your skills with Modern Perl: the free book.

Re^2: The speed of blessed hashrefs, the power of Moose - how to get both?
by wazoox (Prior) on Nov 25, 2011 at 16:03 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://939015]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found