3 ms·
>Could we rephrase the message of the article as "If you write really broken code in Java, you might be not guarded by the type system" The very idea of the ty
by coldtea 8y ago
>Could we rephrase the message of the article as "If you write really broken code in Java, you might be not guarded by the type system"
The very idea of the type system is that it makes "broken code" of a certain type a compile error.
- cmiles74 8y agoFor certain and specific definitions of "broken code".
- coldtea 8y agoYeah, for the type of broken code that has the wrong types.
- cmiles74 8y agoIn some situations. The examples in this article, I think, make it clear that for a lot of "broken code" these errors are caught. It's too bad that there are edge cases, but that is Java all over, in my opinion.
- PDoyle 8y agoRight. I think this is the promise of Java generics: we promise we'll warn you if you're relying on dynamic type checking because we can't prove all dynamic type checks will pass. This article gives a series of examples that break that promise.