Re:Approximating sum types in Python with Pydantic
by levhawk on Thursday August 15, 2024 @07:55AM
(#41254940)
That looks crazy coming from statically-typed languages. So many hops, efforts, custom structures just to verify types. Come on, modern C# can do all of that out-of-the-box. You define a record/class for DTO and System.Text.Json will either convert it successfully or throw you an exception that will say exactly what the problem was and at what character/field. Combined with much more advanced IntelliSense, development comfort is so much better. But of course, whatever works for you.
[ Parent
| on HN ]
There are no comments on this comment yet.