HackerPapers

arXiv:1908.05839cs.PL

Bidirectional Typing

Jana Dunfield, Neel Krishnaswami

Abstract

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.

arXiv comments
37 pages; submitted to ACM Computing Surveys
Journal reference
ACM Computing Surveys 54(5) (2021)
DOI
doi:10.1145/3450952
Subjects
cs.PLProgramming Languages cs.LOLogic in Computer Science

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Jul 2020 to Jun 2024. Found in 1 HN submission from Aug 2019 to Aug 2019. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • I'm suspicious about the truth of this claim. I don't think bidirectional typechecking is the problem in itself: the problem trying to do type inference when you have some extremely flexible operator overloading, subtyping, and literal syntax features. It's these "expressive"…

      withoutboats3View on HNParent context

    • I've been really enamored of bidirectional type systems [0] lately, which seem to really give the best of all worlds. They explicitly separate inference from type checking, with the type checker switching between both modes during checking/inference. It's also more syntax…

      cultusView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.