2 ms·
Except that a strong static type system wouldn't allow you to write code like this in the first place. You wouldn't hit these issues at run-time because you cau
by neurotrace 9y ago
Except that a strong static type system wouldn't allow you to write code like this in the first place. You wouldn't hit these issues at run-time because you caught them at compile-time.
- mikewhy 9y agoSay you have an API endpoint: router.post('/users', (req, res) => { const body = req.body as MyEndpointInterface }) If someone posts to that endpoint with the wrong interface, you're still going to have problems. I'm not sure of any language that would catch such a thing at compile-time and not need some sort of test.