Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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 understand what has been done in this space until now?

like image 746
soc Avatar asked Aug 05 '11 09:08

soc


1 Answers

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.

like image 131
michid Avatar answered Sep 20 '22 14:09

michid