| ▲ | tombert 3 hours ago | ||||||||||||||||||||||||||||||||||
I know everything reduces to bits eventually, but modern CPUs and memory aren’t as “lossy” as the network is, meaning you can make more assumptions about the data being and staying intact (especially if you have ECC). Once you add distribution you have to encode for the fact that the network is terrible. You absolutely can parse at ingress, but then there are issues with that. If the data you got is 3/4 good, but one field is corrupted, do you reject everything? Sometimes, but often Probably not, network calls are too expensive, so you encode that into the type with a Maybe. But of course any field could be corrupt so you have to encode lots of fields as Maybes. Suddenly you have reinvented dynamic typing but it’s LARPing as a static type system. | |||||||||||||||||||||||||||||||||||
| ▲ | jakelazaroff 3 hours ago | parent [-] | ||||||||||||||||||||||||||||||||||
I think you can avoid most issues by not doing what you're describing! Ensuring data arrives uncorrupted is usually not an application-level concern, and if you use something like TCP you get that functionality for free. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||