3 ms·
We have no control over the API that we draw from. We are drawing from the API of a different company. I wish they didn't use JSON. If they have to use JSON, I
by susan_hall 10y ago
We have no control over the API that we draw from. We are drawing from the API of a different company. I wish they didn't use JSON. If they have to use JSON, I wish they at least enforced a consistent schema. But they don't. And that is why static type checking fails: because the real world is chaotic, and when you have to interact with that real world, you are often forced to do so dynamically, because of the mistakes that other companies have made. The real world is dynamic.
- BasDirks 10y agoThe way you talk about static vs dynamic suggests that you only have a very vague idea of what these mean.
- mamon 10y agoOk, so they created a problem by using JSON without schema. Now, instead of fixing problem by enforcing some schema you propose to use dynamically typed programming language which won't solve the problem but instead will make it spread thorough the whole codebase. At least static typing limits the damage to the code that directly deals with parsing JSON.
- oldmanjay 10y agoYou're insisting on an assertion that the experience of many of us directly contravenes. It's not the best way to make a point.
- sidlls 10y agoThe real world being dynamic has almost literally nothing to do with this issue. The concepts are completely unrelated. Although I'd agree that I find development with dynamically typed languages a bit more chaotic than static or strongly typed ones. And not necessarily in a fun, good way, either.