Re:38% of bugs at Airbnb could have been prevented by using ...
by baroffoos on Monday February 11, 2019 @01:04AM
(#19132405)
Not at all. Typing bugs often leave code looking perfectly fine until you discover that one of the variables you expected to be y was actually x. And the only way to find out is to just print out everything
[ Parent
| on HN ]
Re:38% of bugs at Airbnb could have been prevented by using ...
by jondubois on Monday February 11, 2019 @04:39AM
(#19133159)
Can happen with TypeScript too. There is no runtime type checking so if you parsed a JSON object and cast some unknown property `const result = someRemoteObject.someUnknownPropertyWhichIsAString as number`, it doesn't guarantee that the result is actually a number. You still need to do actual schema validation just like with old school JavaScript.