Was that a personal dig? Never mind.

Not at all, IIRC you and I have had debates/discussions about this before. And I know you have debated this with nothingmuch too. Would you classify yourself as not performance obsessed? Maybe obsessed is too strong a word for you, but you get my point.

No, not a dig at all, I would have been much more snide and condescending if was going for that ;)

Many applications are performance intensive (cpu-bound, data-bound), rather than IO-bound. And indeed, cpu-intensive applications are exactly the ones which most benefit from OO ...

Well, any application over a given size benefits from OO (or some similar modularization construct). I would argue that CPU-intensive applications while maybe benefiting from the encapsulation and modularization bits of OO would not benefit from the heavy abstraction of OO (boxed types, etc). It is also worth pointing out that languages like Java, C++ and even Ocaml/Haskell have the benefit of optimizing compilers and no need for runtime type information due to static analysis. It is very easy for the compiler (at compile time) to remove lots of information that would otherwise slow down an application. It is not so easy for a dynamic language like Perl (or Python, or Ruby) to do this. The real point being, there is always trade-offs and language choice is one place you make those trade-offs. If my application is cpu-bound then I would likely not use Perl (or at least not 100% Perl) simply because I would have to make too many compromises for performance and not be able to use nice things like OOP.

And, on the basis of my limited exploration of Moose guts, I truly believe that it wouldn't take a huge effort to reduce the performance penalty for using it to the point where it wouldn't have to advertise itself as for "non-performance critical applications only". It might require the dropping of a few Holy Cows though.

Want a commit bit? I am open to thoughts about dropping cows and such.

-stvn

In reply to Re^15: Data Structures by stvn
in thread Data Structures by YYCseismic

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.