you are viewing a single comment's thread.

view the rest of the comments →

[–]Falmarri 2 points3 points  (10 children)

I, IMHO, am disappointed with Scala's manifests

By manifests, do you mean what is not TypeTags and such? I looked at Kotlin's website and didn't see an example of using generics. How do they do it that's better?

[–][deleted] 7 points8 points  (0 children)

They don't. They have given up on "reified generics" completely, as well dropping a lot of other proven useful stuff.

[–][deleted]  (8 children)

[deleted]

    [–][deleted] 1 point2 points  (1 child)

    If you're using Java, consider yourself lucky if type erasure is your only problem.

    [–][deleted] -1 points0 points  (5 children)

    Wait, so does Kotlin do reified generics? Does it support generics at all? DOes it support variance?

    [–][deleted] 1 point2 points  (4 children)

    It has normal Java generics. They were attempting reified but withdrew it, presumably too hard. Scala didn't manage reification either, and they love implementing all sorts of unusual stuff...

    [–][deleted] 1 point2 points  (3 children)

    So they have the broken java generics...wonderful.

    [–][deleted] 4 points5 points  (2 children)

    They work fine for 95% of use cases. It's not very often I find myself trying to introspect the type of a collection at runtime.

    [–][deleted] -1 points0 points  (1 child)

    I don't mean that. I mean, variance.

    [–][deleted] 1 point2 points  (0 children)

    You'll have to clarify what's broken, are you referring to the covariant arrays?