斯卡拉的Manifest
是一種解決某些類型的刪除問題的方式,這是由於JVM缺乏物化泛型。Scala的Manifests有什麼限制?
他們在幾個其他問題中討論;這裏有幾個:
- What is a Manifest in Scala and when do you need it?
- How does Scala's (2.8) Manifest work?
- How do I get around type erasure on Scala? Or, why can't I get the type parameter of my collections?
- How can I use Scala's Manifest class to instantiate the erased class at runtime?
- Manifest vs ClassManifest. What does this Scala error mean?
一位評論提到,「這個功能是實驗性的,也有情況在其中它不起作用。 「(Daniel Sobral)
Manifest方法崩潰的原因是什麼?爲什麼?