Java's OO is generally cleaner than Perl's, at least from the point of view of the language itself (the API, OTOH, has turned into an unmaintainable mess of broken classes that were replaced with brand new classes instead of fixing the orginal problem). Inheirtience, in particular, works a lot better (inheritience is so clunky in Perl5 that some people say you should avoid it completely).

As for overall language comparisons, it's hard to find objective comparisons between Perl and Java, but you can dig up plenty of flame wars.

IMHO: When I was first learning Java, I thought I had finally found the closest thing to the One True Language I could ever hope for. And indeed, the language structure and object system is very clean. However, the API is so annoying that it elimnates any benifit the underlieing language would have given you. And don't get me started on AWT and Swing.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated


In reply to Re: Java for Perl programmers by hardburn
in thread Java for Perl programmers by jacques

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.