92
Parse, don’t validate
(lexi-lambda.github.io)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Yes! The concepts are intertwined. I think the key take away, for me, is to lean heavily into your type system and allow that to do some of the heavy lifting. Accept that something like a
usernameis not a string, but a subtype of a string (this has to be true if any validation is required, otherwise you'd just accept any valid string).