开发者

Why are reified generics hard to combine with higher-kinded types?

There exists a notion that combining reified generics with higher-kinded types is a hard problem.

Are there existing languages who have successfully combined these two type system features or is it not possible in general?

Is there any further information available to开发者_C百科 understand what has been done in this space until now?


For the second part of the question: Have a look at the Scala programming language which has successfully combined reified generics from the underlying JVM with higher kinded types. The key concepts to make this work are implicit parameters and Manifests. A manifests is used to port some of the erased type information over to run time and implicits are used to inject the manifest in a type class like manner. The blog post Manifests: Reified Types has more details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜