Can generic parameters be reified at class level?

Hi @mshere96,

this could be done, but in such case this class become a part of the public ABI, so the compiler have to generate it even it is not used anymore, so I shall discard this path.

Instead many projections of the same class exposes to performance problems (CPU L1 cache will contains a lot of duplicated code) and may become too expensive for Android application (total method count is limited).

I don’t think that this is a bad idea, however JVM type erasure is a big obstacle.

Currently we are discussing a similar proposal

I proposed an enhancement to emulate reified type, see here

3 Likes