I'm arguing that value types are latent in Perl, and this isn't a good thing considering the advances in type systems over the last 30 years.

I've been thinking over my response all of yesterday. What I understand you saying is that Perl's SCALAR type is too broad. To me, this implies that you want to have the optional capability of having a numeric, a string, and a reference type. The argument I hear you and others making is that different operations behave in different ways, depending on the value contained in the SCALAR, thus they should be different types. Then, to maintain compatibility with the best parts of Perl's SCALAR type, all the operators and builtins that we would like to behave agnostically with reference to numerics and strings will be polymorphic. (References, I agree, should be separate from scalars.) And, you want this type-checking to happen at compile-time.

That's a very interesting argument. I'd have to see more details before I can agree or disagree. I like the basic premise, but the devil's in the details.


In reply to Re^4: Static typing is mostly a waste of time by dragonchild
in thread Static typing is mostly a waste of time by johnnywang

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.