<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-choose-between-hindley-milner-and-bidirectional-typing-wdtkenmfn" -->

---
title: How to Choose Between Hindley-Milner and Bidirectional...
description: The common question of whether to use Hindley-Milner (HM) or Bidirectional (Bidir) typing for a new programming language is a false dichotomy. The real...
canonical: https://daily.dev/posts/how-to-choose-between-hindley-milner-and-bidirectional-typing-wdtkenmfn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Choose Between Hindley-Milner and Bidirectional Typing | daily.dev
og:description: The common question of whether to use Hindley-Milner (HM) or Bidirectional (Bidir) typing for a new programming language is a false dichotomy. The real...
og:url: https://daily.dev/posts/how-to-choose-between-hindley-milner-and-bidirectional-typing-wdtkenmfn
og:image: https://api.daily.dev/og/posts/wDtKEnMFn.png
og:image:alt: How to Choose Between Hindley-Milner and Bidirectional Typing
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Choose Between Hindley-Milner and Bidirectional Typing

**[Hacker News](https://daily.dev/sources/hn)** · 6 min read · 0 upvotes · 0 comments

## Summary

The common question of whether to use Hindley-Milner (HM) or Bidirectional (Bidir) typing for a new programming language is a false dichotomy. The real question is whether your language needs generics. Generics require unification, which is central to HM, but bidirectional typing is actually a superset of HM — it can incorporate unification just as well. Adding a `check` function alongside an HM `infer` function is all it takes to make a system bidirectional. The practical guidance: if you're building a general-purpose language, support generics and use unification within a bidirectional framework. If you're building a DSL or learning project where simplicity matters, annotation-driven bidirectional typing without unification is a valid, simpler choice.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thunderseethe.dev/posts/how-to-choose-between-hm-and-bidir/>

## Similar posts on daily.dev

- [Haskell for all: A bidirectional typechecking puzzle](https://daily.dev/posts/haskell-for-all-a-bidirectional-typechecking-puzzle-wbty7vdm3) · Planet Haskell · 0 upvotes · 0 comments
- [A Guide to Typed Lambda Calculus](https://daily.dev/posts/a-guide-to-typed-lambda-calculus-qqejiz4hb) · Serokell · 0 upvotes · 0 comments
- ["Five-Point Haskell": Total Depravity \(and Defensive Typing\)](https://daily.dev/posts/five-point-haskell-total-depravity-and-defensive-typing--xwwoyitrt) · Planet Haskell · 0 upvotes · 0 comments
- [Haskell, Strong Types, and the Next Generation of Bioinformatics: interview with Michal Gajda](https://daily.dev/posts/haskell-strong-types-and-the-next-generation-of-bioinformatics-interview-with-michal-gajda-vqanncaau) · Serokell · 0 upvotes · 0 comments
- [Learning Lean: Part 1](https://daily.dev/posts/learning-lean-part-1-ruwzozxws) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#type-systems](https://daily.dev/tags/type-systems)

[View this post on daily.dev](https://daily.dev/posts/how-to-choose-between-hindley-milner-and-bidirectional-typing-wdtkenmfn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Choose Between Hindley-Milner and Bidirectional Typing","url":"https://daily.dev/posts/how-to-choose-between-hindley-milner-and-bidirectional-typing-wdtkenmfn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-choose-between-hindley-milner-and-bidirectional-typing-wdtkenmfn"},"datePublished":"2026-02-19T07:02:13.804Z","dateModified":"2026-02-19T07:02:35.699Z","description":"The common question of whether to use Hindley-Milner (HM) or Bidirectional (Bidir) typing for a new programming language is a false dichotomy. The real...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-choose-between-hindley-milner-and-bidirectional-typing-wdtkenmfn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"type-systems","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"How to Choose Between Hindley-Milner and Bidirectional Typing"}]}
```

