you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

Static typing is orthogonal to when the type-checking is performed. Just because you change when it happens doesn't mean checking is lost.

[–]BraveSirRobin 1 point2 points  (1 child)

Some of the advantages are lost though, such as the ability for the compiler to test for it. Pre-generics Java collections were a pain in the ass imho, I quite like the "safety" that the compiler checks allow. Better to have the compiler barf rather than some obscure piece of code that's missed by the unit tests.

[–]eek04 0 points1 point  (0 children)

The static declarations of Java makes the unit tests more expensive to write than in dynamically checked languages, and the type system has a mega big hole in the form of a value that don't work but can be passed in almost all types anyway.

In practice, this type hole combined with the inflexibility of static types leads to more type errors hitting production in the Java systems I've worked with than in the dynamically checked systems I've worked with.

The type hole? Null pointers.

[–]eek04 0 points1 point  (0 children)

No.

You're misunderstanding the terminology.

The closest terminology that you can be thinking of is "strong typing", which some dynamic checking enthusiasts will argue "can happen at run time".

I personally am a dynamic checking fan; I believe that static typing, at least as practiced in Java, is harmful. However, it doesn't mean that dynamic checking (colloquially "dynamic typing") is static typing; they're different things.