类型推断的局限性是什么? [英] What are the limits of type inference?

查看:96
本文介绍了类型推断的局限性是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类型推断的局限性是什么?哪些类型的系统没有通用的推理算法?

What are the limits of type inference? Which type systems have no general inference algorithm?

推荐答案

Joe Wells 表明,System F无法确定类型推断,System F是最基本的多态Lambda演算,由Girard和Reynolds独立发现.这是显示类型推断限制的最重要结果.

Joe Wells showed that type inference is undecidable for System F, which is the most basic polymorphic lambda calculus, independently discovered by Girard and Reynolds. This is the most important result showing the limits of type inference.

这里还有一个重要的问题:将广义代数数据类型集成到Hindley-Milner类型推断中的最佳方法是什么?西蒙·佩顿·琼斯(Simon Peyton Jones)每年都会提出一个新的答案,据说比上一年的答案要好.我尚未阅读2009年3月的版本,因此无法说是否能确定性.

Here's an important problem that is still open: what is the best way to integrate Generalized Algebraic Data Types into Hindley-Milner type inference? Every year Simon Peyton Jones comes up with a new answers, which is supposedly better than the previous year's answer. I haven't read the March 2009 version and so can't say if I believe it will be definitive.

这篇关于类型推断的局限性是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆