I find it amusing how many people dismiss Java's static typing as a waste of time and stupid. I image that most of the people saying this are fairly ignorant of java. Static typing might be a pain because you have to do explicit cast. But it greatly speeds up developement time because it catches a lot of errors at compile time that would be very hard to track down when they happen as runtime errors in perl. Just because johnnywant doesn't know how to use typing doesn't make it useless.

That might be true of some people, but it's certainly not true of all. Many people are criticising the typing model of Java and similar languages because they use them a great deal, they get in the way and they make the code harder to understand.

They criticise it because they try using languages like Ruby, Python and Perl and discover that all those nasty things they think will happen without static typing don't.

Take a look at what Bruce Eckel's (hardly somebody who knows nothing about Java) has written about these issues in Strong Typing vs. Strong Testing and Type Checking and Techie Control.

They criticise it because languages like Haskell have been doing compile-time typing in much more interesting and productive ways for years. Good god, Java has only just got around to implementing generics!

(Please note: Adrian may be more grumpy than normal due to having to get his head around possibly the most obscene use of C++ templates he has ever seen. I do not need to see compile time recursion for no good reason before I've finished my first coffee of the day :-)


In reply to Re^2: Static typing is mostly a waste of time by adrianh
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.