You can't really try to successfully take all that into consideration on the same level. Rather, I would say that Perl has multiple distinct type systems layered on top of each other:

  1. The base type system, the one actually concerned with the representation of values, is strongly typed and completely uncircumventable. You can neither cast nor convert values into each other at this level, in any way, shape, or form.
  2. Context is a distinct typing system and quite strongly typed (think of "there is no list in scalar context", f.ex). However, it has a full set of conversion rules covering all axes, so in practive, that hardly matters.
  3. The high level type system, the level at which strings and numbers differ f.ex, is just about typeless. This layer is vague and always implicit, never declared, nowhere to be enforced.
  4. Finally, the type of an object is yet another fully disjoint typing system; in fact it is just metadata dangling off of a thing, only accessible via a reference. I am not sure how strongly typed this can be considered to be, but even if so that is ultimately meaningless since it is completely dynamic to the point that what it means that an object is of some type can completely change at any point. It also exists in a kind of vacuum, because the only time it ever matters is on method lookup. In all other circumstances it is completely inconsequential.

If we tally up, we find that we have two explicit typing systems which are both strong, and one which is barely definable and can hardly be called a typing system at all. Then we have another one dangling on the side of it all, nearly completely isolated and so ridiculously dynamic it doesn't even make sense to talk about whether it is strong or not.

So, yes, Perl as a whole defies classification.

If you scale back and look at the innate typing that's an explicit part of the language, however, you find that to be a strong one. That's why me or merlyn or chromatic will assert that Perl is strongly typed. Of course, noone will dispute that it is a strange example of strong typing. :-)

Makeshifts last the longest.


In reply to Re^14: use fields; # damnit by Aristotle
in thread use fields; # damnit by nothingmuch

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.