Comment Re:2 weakest points of Java (Score 1) 330
We've also spent quite a bit of time in an attempt to make generics worth while. First, unlike Java, Gosu generic types are fully reified at runtime. So the pitfalls of type erasure are non-existent in Gosu. This is especially helpful in combination with Gosu enhancements to Java collections. Next, and probably most important, there are no wildcards in Gosu. Wildcards, more specifically use-site variance, is the bane of Java generics, in our opinion. Basically, use-site variance puts the onus on the *user* of a library regarding variance wrt type parameters, which, even if applied correctly, spreads confusion throughout a codebase. I designed and implemented generics in Gosu and I still have a hard time reading and understanding Java code with wildcards.
Essentially, wildcards are an attempt at making Java's static type system "sound", which is a noble goal. But soundness alone isn't useful to us programmers. After all static typing is there for *us*; it's supposed to help *us*. If it's not helping most of the time, what good is it? That is the rationale behind Gosu generics and why we chose to apply array-style variance, which everyone seems to understand. True, it's a trade-off; our type system is not completely sound, but it's a trade-off we've been happy with so far.