...you're right about this BrowserUK. Garbage collection doesn't get a chance to shine here. This was really a stack overflow test.

To answer part of the originally posed question here, yes, Java does have some problems with it. Expect object overhead to be greater than in Perl. (In Perl, we simply string some things together and declare them an object. And that's very appropriate for our style of doing things.)

In Java, there is a significant workload associated with creation of an object. Issues such as security and multithreading are important in that setting.

Were we to address some of the same concerns in Perl, we'd have to provide that infrastructure for ourselves. And that's okay. It would probably be "just as much as we needed," for that is the strategy for object creation in Perl.

Each has its place. If I have to put five people to work designing and implementing parts of a system that will have to be integrated, I think I want them using a discipline that enforces somewhat rigid conventions.

If I have to put one really bright programmer to work at implementing a system that will be running quickly, I want a programming model that gives me just as much as I need, and stated in just about any fashion that makes sense to me.

Or perhaps:

++$perl if $rapid_development > 2; # we need it fast ++$perl if $developers <= 2; # we have a small dev team ++$java if $threadsafe > 2; # we plan heavy thread use ++$java if $foreign_objects > 2; # untrusted objects print $perl >= $java ? "perl" : "java";

You can use Perl for anything under the sun. But perhaps not everyone should try.

...All the world looks like -well- all the world, when your hammer is Perl.
---v


In reply to Re: Re: Memory Use/Garbage Collection: Java vs Perl by agentv
in thread Memory Use/Garbage Collection: Java vs Perl by c0d3cr33p

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.