Hi! I've created this page to showcase the features of Mint (since there are so many) and their corresponding versions in other similar languages.

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 1 year ago (1 child)

That's crazy, I thought that would be an invalid cast or something.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 year ago

    Unfortunately not. You do get a warning that it's an unchecked cast at least.

    Granted, the issue here is generic type erasure, which was a tradeoff that was decided on for backwards compatibility when generics were first introduced to Java, so it's not like an actually desirable feature of the language. But the point is that this wouldn't be reason for anyone to not call Java and Kotlin not statically typed, their type system is just a bit weaker than others in certain aspects

  • source
  • parent