I'll take your word for the compatibility features of Moose. I haven't seriously used it (yet).

I disagree with you here in regards to Perl. In Ruby they had to create a "standard library" of classes (Array, etc) because "Everything is an Object", whereas in Perl you could consider the standard library to be built-in (non-OO) arrays, hashes, scalars and the functions that operate on them.

The problem is, perl's standard containers are conceptually objects just like custom-made perl objects, except the interface to them is completely different. So different in fact, that you can't use the standard iteration constructs (like foreach and while each), or calling/accessing ops (like (), [] and {}) on anything that implements a "normal" OO interface. And THAT means you can't use the familiar iteration constructs on any user-defined object, unless it sacrifices easy access to other potentially useful methods.

In other words: the problem isn't that arrays and hashes aren't objects, the problem is that the perl programmer cannot reasonably define his own datastructures that can be accessed using the same interface the build-in types use. It's a problem of (access to/lack of) well-defined interfaces. And I stand by my assessment that tie() is an ugly hack that only half-way overcomes this issue.


In reply to Re^9: Perl Vs Ruby by Joost
in thread Perl Vs Ruby by Dhanasekar

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.