计算机科学 > 程序设计语言
[提交于 2019年8月16日 (v1),最后修订于 2020年11月14日 (此版本, v2)]
标题:Bidirectional Typing
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Bidirectional typing combines two modes of typing: type checking, which checks that a program satisfies a known type, and type synthesis, which determines a type from the program. Using checking enables bidirectional typing to support features for which inference is undecidable; using synthesis enables bidirectional typing to avoid the large annotation burden of explicitly typed languages. In addition, bidirectional typing improves error locality. We highlight the design principles that underlie bidirectional type systems, survey the development of bidirectional typing from the prehistoric period before Pierce and Turner's local type inference to the present day, and provide guidance for future investigations.