4 ms·
I mean. They gave example of where it might be commonplace, which is at API boundaries. Especially at DB boundaries, there’s decisions to make. If you put your
by wredue 3y ago
I mean. They gave example of where it might be commonplace, which is at API boundaries.
Especially at DB boundaries, there’s decisions to make. If you put yourself in a position of your db having entirely non-nullable fields, you end up in one of two situations:
1) your whole db is key/value
2) you have magic values
Making all key/value doesn’t solve the nullability issue at the code boundary if you’re representing as an object, so you’re left with magic values. I think we all know how nice magic values are.
Ideology is the enemy of practicality.