Re:Approximating sum types in Python with Pydantic
by myvoiceismypass on Wednesday August 14, 2024 @11:30AM
(#41247225)
FWIW I seem to often find myself reaching for Haskell-isms when writing Typscript or Scala. And I’ve never actually written production Haskell code! But so many concepts like this just map nicely. “Parse don’t validate”, “make illegal states unreprsentable”, etc - all those patterns.
[ Parent
| on HN ]