logoalt Hacker News

piinbinarytoday at 3:26 AM3 repliesview on HN

> friends don’t just bring up type inference in casual conversation

I wonder if this is a reference to "I need you to understand that people don't have conversations where they randomly recommend operating systems to one another"

But to the actual point of the article: my understanding is that there are areas where you can use bidirectional typing (e.g. languages that have subclasses) where HM style type inference might become undecidable.


Replies

laksjhdlkatoday at 3:33 AM

I once studied proof theory for a summer at a school in Paris and we talked about type inference and theorem proving all the time in casual conversation, over beers, in the park. It was glorious.

Being a student is so much fun, and we often waste it, or at least don't value it as much as we ought. 20 years later I'd love to go back.

show 2 replies
thunderseethetoday at 3:46 AM

> I wonder if this is a reference to "I need you to understand that people don't have conversations where they randomly recommend operating systems to one another"

It is!

> my understanding is that there are areas where you can use bidirectional typing (e.g. languages that have subclasses) where HM style type inference might become undecidable

There are! Afaik most languages end up with a bidirectional system in practice for this reason. Haskell started out HM and has shifted to bidir because it interacts better with impredicative types (and visible type applications). Bidir can handle fancy features like subtyping and all sorts of nifty stuff.

bborehamtoday at 7:43 AM

The subject does sometimes come up in my casual conversations, since Robin Milner was my first CS lecturer.

He never actually spoke about type inference in my presence. He did teach me CCS (pi-calculus predecessor) a couple of years later, by which time I could appreciate him.