Domanda

Possible Duplicate:
Scala 2.10: What is a TypeTag and how do I use it?

I have been reading about the new TypeTags which come along with the new reflection api. It seems that Manifests are supposed to be replaced with that new concept. Can anyone post some code examples to show the benefits?

Some references:

È stato utile?

Soluzione

Manifests are a lie. It has no knowledge of variance (assumes all type parameters are co-variants), and it has no support for path-dependent, existential or structural types.

TypeTags are types as the compiler understands them. Not "like" the compiler understands them, but "as" the compiler understands them -- the compiler itself use TypeTags. It's not 1-to-1, it's just 1. :-)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top