Hacker News new | ask | show | jobs
by rit 5910 days ago
Scala has Manifests to emulate reified types for just this reason.

http://www.scala-blogs.org/2008/10/manifests-reified-types.h...

It's improved a bit in 2.8 - in porting some code I discovered a nice little hack that lets you declare your variance like this:

[A <: SomeBaseClass <: Manifest]

Which tells the compiler in an oh so gentle manner to reify for you.