Get the latest tech news

How types make hard problems easy


A deep dive into how I use types to the fullest

I’ll start working on a large refactor that requires breaking an assumption made throughout the code & quickly discover that the type system makes the change trivial. Hopefully, you can imagine how this small example could expand to a production application with dozens of types & hundreds of business logic rules encoded in a network of pure functions. Despite being a full-stack application that needs Internet to run locally, I can get on a flight with no wifi, pull out my laptop & implement a new Heartbeat feature with zero distractions — just me and my type checker.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of types

types

Photo of hard problems

hard problems

Related news:

News photo

Waste oil turned into biodiesel in just 60 minutes, can power all types of vehicles | Chemists have also claimed that the reaction can be completed in under an hour at a temperature lower than that required to boil water.

News photo

Sets, types and type checking

News photo

Democrats and Republicans may agree more on hate speech than you think | The research found that while Democrats generally support more censorship than Republicans, both groups tend to agree on which types of hate speech should be restricted.