为什么具体化泛型很难与更高种类的类型结合?
有一种观念认为,将具体化泛型与高级类型相结合是一个难题。
是否存在已成功结合这两种类型系统功能的现有语言,或者一般来说这是不可能的?
是否有任何进一步的信息可以帮助您了解迄今为止在该领域所做的工作?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于问题的第二部分:看看 Scala 编程语言,它成功地结合了具体化泛型来自具有更高种类类型的底层 JVM。实现这项工作的关键概念是隐式参数和清单。清单用于将一些已删除的类型信息移植到运行时,而隐式用于以类似类型类的方式注入清单。博客文章清单:具体化类型提供了更多详细信息。
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.