3 ms·
What you’re describing isn’t exactly new territory for me. Maybe you’re writing for the room, and not immediately for my benefit. Parsing is kind of… everywher
by yakshaving_jgt 2y ago
What you’re describing isn’t exactly new territory for me. Maybe you’re writing for the room, and not immediately for my benefit.
Parsing is kind of… everywhere. Path piece instances? Parsing. Forms? Parsing. The whole point of smart constructors is parsing. Deserialising from the persistence layer? Parsing. Sure, JSON and Protobuf also, but even when relying on a robust library like aeson, we still write tests. Why wouldn’t you? The types you define can be serialised in different ways, and the way you deserialise needs to roundtrip with the way you (or an external system) serialise(s), which also necessitates more tests.
- ninetyninenine 2y agoI wouldn't because the deserialization library is tested to death by the library maintainers.
- yakshaving_jgt 2y agoI don’t think you are understanding me. Here is a clear example of what I am talking about. https://jezenthomas.com/2022/12/at-least-roundtrip-serialisation/ https://jezenthomas.com/2022/12/at-least-roundtrip-serialisa...