3 ms·
Scala has Manifests to emulate reified types for just this reason. http://www.scala-blogs.org/2008/10/manifests-reified-types.html http://www.scala-blogs.org/2
by rit 16y ago
Scala has Manifests to emulate reified types for just this reason.
http://www.scala-blogs.org/2008/10/manifests-reified-types.html 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.