4 ms·
>or when the value needs to be nullable. I'd discount this part entirely. Using a boxes/non-primitive type for nullability is likely a design mistake. I can go
by xxs 3y ago
>or when the value needs to be nullable.
I'd discount this part entirely. Using a boxes/non-primitive type for nullability is likely a design mistake. I can go in a full rant mode, in practical terms I tend to reject pull requests that do that.
- wredue 3y agoI 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.