I can't think of a better discussion of typing issues than Dominus' Strong Typing and Perl talk. He knows a lot more about programming design than I do. In the talk, he argues that static typing (at least in C) is pretty much a failure. A very interesting alternative he brings up is a type-inferencing language like ML (or its variants). ML is a cool language if you have the chance to learn it, and I can attest to the fact that type inferencing really does help to avoid bugs.

In some senses, Perl really is strongly typed... at least in terms of scalars vs compound types. I seem to remember someone's sig around here that has a quote about Perl being strongly typed but not having many types. The best example of this is that a hash or array value must always be a scalar. Of course, Perl gives us references and does things like listification, so we hardly notice the distinction after a while.

In the end, I think it's really the polymorphism of the various scalar types (and not the lack of types) that lets us do all the things we love in Perl.

blokhead


In reply to Re: Static checking by blokhead
in thread Static checking by hanenkamp

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.