News for hackers. Stuff that matters.
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.
Re:38% of bugs at Airbnb could have been prevented by using ... by baroffoos on Monday February 11, 2019 @05:36PM (#19139130)
Better languages solve this. In haskell you define a datatype for json before you parse it.