3 ms·
And that's my point: I'm usually getting AccountIDs from strings (passed in via HTTP requests) so the whole thing becomes a pointless exercise.
by recursivedoubts 1y ago
And that's my point: I'm usually getting AccountIDs from strings (passed in via HTTP requests) so the whole thing becomes a pointless exercise.
- petesergeant 1y agoDo you validate them? I assume you do. Feels like a great time to cast them too
- Kranar 1y agoYou just accept raw strings without doing any kind of validation? The step that performs validation should encode that step in the form of a type.
- recursivedoubts 1y agoi pride myself in never doing any validation ever never escape anything, either just hand my users a raw SQL connection
- thfuran 1y agoI prefer to just skip a few steps and email them my bank account number when they register an account.
- lmm 1y agoIf your system is full of stringly typed network interfaces then yes there is no point in trying to make it good. You can make things a bit better by using a structured RPC protocol like gRPC, but the only real solution is to not do that.