Post #2430694
2026-04-28 19:58 UTC
@davidism@mas.to basically whenever I am trying to make this decision I am looking hard at the UI and the user's mental model and trying to match it as closely as possible. if a user cannot look at a UI element and distinguish, visually, the difference between "empty" and "null" then it is really important not to let the data model reflect that difference. if the user *can* see that, then it's very important to accurately reflect it structurally and to avoid heuristics or guesses to infer emptiness
Replies (1)
-
@glyph@mastodon.social 2026-04-28 19:59
@davidism@mas.to like I'm a big fan of Active Nothing and other coding tricks to avoid null checks, and sometimes there's a superficial temptation to say "oh well if it's a string there's no need to make you deal with null" but if you have to guess that "empty string" means "not specified" then you're not saving work you're creating NEW work, work that the type checker or linter isn't even going to warn you that you need to do when you forget to do it