Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I don't like about Java and C++ (Static typing is just wrong!

Java and C++ are not really statically typed, in that they allow casts, in fact they require casts. This means that type errors can occur at runtime, which is exactly what static typing is supposed to prevent. Have a read MJD's excellent talk? You should read some ML or Haskell, you don't have get into monads to appreciate a lot of Haskell's typing system. I'm not even sure if I correctly understand monads because I haven't ever tried to write anything in Haskell but I can still appreciate what real static typing (with type inference so that you don't have keep telling the compiler things it could work out for itself) can do.

I think it's cecil that brings another rather cool feature to static typing, it lets you get it wrong but still compiles your code (issuing warnings of course). This allows you to experiment with your classes as in a dynamic language without having to rewrite half your code just to get it to compile.

So yes, Java and C++'s static typing is absolutely wrong but it's not really static typing.


In reply to Re^4: (OT) "Learn one new language every year"? Yeah, right. by fergal
in thread (OT) "Learn one new language every year"? Yeah, right. by FoxtrotUniform

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-26 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found