| ▲ | How to Choose Between Hindley-Milner and Bidirectional Typing(thunderseethe.dev) | ||||||||||||||||||||||
| 79 points by thunderseethe 4 days ago | 9 comments | |||||||||||||||||||||||
| ▲ | piinbinary 3 hours ago | parent | next [-] | ||||||||||||||||||||||
> 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. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | gergoerdi 4 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
If your type system is HM, consider a compositional type system instead, for much better explainability of type derivations and type errors: https://unsafePerform.IO/projects/talks/2016-06-compty/CompT... | |||||||||||||||||||||||
| ▲ | kccqzy 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
> What folks should actually be asking is “Does my language need generics?”. You should also ask “Does my language need subtyping such as subclasses?” And if the answer to both is yes, you should probably forget about Hindley Milner, or at least pick something far away from it on the spectrum. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | Panzerschrek 44 minutes ago | parent | prev [-] | ||||||||||||||||||||||
I have my own programming language (pretty advance), but I don't even know what these two typing approaches are. Is it problematic? Or I just have one of these two without knowing that? | |||||||||||||||||||||||