Branded types have saved my ass so many times
@mattpocockuk381K followers
18,425 views
7 Comments
Comments from the original post on X (Twitter)

@aarondelasy
that’s great when you have time to create those. with the recent hype around vibe coding, you either ship a new SaaS or create branded types - that's the pace nowadays
4 likes

@RainmakerTrade
Curious about the best strategy for volatile markets? Dive into my free Substack post where I use a Hidden Markov Model (HMM) to sidestep market turbulence and protect the portfolio.
186 likes

@Kosai106
I use branded types for IDs in a project at work, it's been great. Saved our ass a few times where using plain "string" types wouldn't have caught misuses.
4 likes

@healthycola
Tried introducing this to my workplace. It felt very reminiscent of the JavaScript vs typescript debate. “Too much overhead”, “does it really save time”, “is it worth the effort” etc
3 likes

@TheChigerian
this works really well if you combine it with Zod’s brand method, and create a function that can convert a primitive input to its branded version
2 likes

@geteviapp
This is the most unclear video you ever made… and you’re the one who explained the string or literal typing. Just saying

@mattpocockuk
What felt unclear?