Email or username:

Password:

Forgot your password?
Top-level
Jonathan Joelson

@jasongorman For me, getting the model types right makes it easier to think through the behavior properly.

The simplest example is nullability. If your type system can express that and enforce null handling, then that forces you to think about stuff like “how should this operation behave when property A is null”?

I’d say sum types (e.g. sealed classes) where the compiler can check that you’ve exhaustively handled all scenarios is the next level of that beyond nullability.

1 comment
Jakub Neruda

@jjoelson @jasongorman Or even better, replace nullability with Optional types and the API itself forces you to deal with those cases, you don't need a fancy schmancy null-checking systems 😉

Go Up