Re:The advantages of static typing, simply stated
by susan_hall on Friday September 16, 2016 @10:08AM
(#12514083)
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.
[ Parent
| on HN ]
Re:The advantages of static typing, simply stated
by sidlls on Friday September 16, 2016 @10:42AM
(#12514309)
The 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.
Re:The advantages of static typing, simply stated
by mamon on Friday September 16, 2016 @10:19AM
(#12514160)
Ok, 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.