Comment by LelouBil
7 hours ago
Look up NewTypes.
The article's dance is to avoid having extra fields that are completely unnecessary here. They want some kind of nominal email type, that is actually a string, so can be used in places where a string is needed, but when a method requires an "email" you can't use any string.
It's a pretty common pattern in functional programming and in many other languages nowadays
No comments yet
Contribute on Hacker News ↗