4 ms·
> but the crucial part is: the "validation" word is systematically pushed to the program boundaries Yea, so again. Isn't that freaking obvious?! That author se
by qsera 8mo ago
> but the crucial part is: the "validation" word is systematically pushed to the program boundaries
Yea, so again. Isn't that freaking obvious?! That author seem to be experienced in Haskell where this kind of thing is common knowledge and for some reason this seems to be some kind of revelation to them...
- instig007 8mo ago> Yea, so again. Isn't that freaking obvious?! apparently not, as I always find snippets of patterns of this kind from my coworkers (and I've worked in many companies, including the ones that require precision for legal compliance): def do_business_stuff(data): orders = data.get("orders") if not orders: return for order in orders: attr = order.get("attr") if attr and len(attr) < 5: continue ... The industry's awareness baseline is very low, and it's across tech stacks, Haskell is no exception. I've seen stuff people do with Haskell at 9 to 5 when the only thing devs cared about was to carry on (and preferably migrate to Go), and I wasn't impressed at all (compared to pure gems that can be found on Hackage). So in that sense having the article that says "actually parse once, don't validate everywhere" is very useful, as you can keep sending the link over and over again until people either get tired of you or learn the pattern.
- qsera 8mo agoBut in all seriousness devs could be both be aware and indifferent to it at the same time. And sometimes, if you are not sure about the constraints 100%, it might even be the safe thing to do.