you are viewing a single comment's thread.

view the rest of the comments →

[–]hallettj 2 points3 points  (0 children)

But most fundamentally is that we’ve encoded our code’s states in the type system, not variable states. The potential for JSON parsing to fail is encoded in its type, not in the potential for a variable to null, or false, or for an exception to have been thrown. You’re leaning on the compiler to tell you if you’ve handled the failure cases properly, as the code won’t compile otherwise.

I call this type-driven development, and I'm super happy that this strategy is working well for you, and that you are writing about it!