News for hackers. Stuff that matters.
Re:Type-safe GraphQL with OCaml by z3t4 on Saturday December 02, 2017 @04:49PM (#15834297)
It is still not clear, it seems more like a logic error to me. Zero means success and a non zero value is an error code. It basically says "if login fails, then do this". If they would have used a boolean instead, or a result enum, the code would have taken the same path! I argue that strong typing would not have detected the logic error! The bad code was probably rushed in to make the upgrade work. All tests turning up green can really put you into a false sense of security. But that is another strongly opinioned topic!
Re:Type-safe GraphQL with OCaml by KirinDave on Sunday December 03, 2017 @05:32PM (#15840048)
You've just defined two type errors.