11 ms·
> use false to “explicitly assign it” Then you still have null, you’re just spelling it funny while confusing all the other developers who have to deal with yo
by JimDabell 6y ago
> use false to “explicitly assign it”
Then you still have null, you’re just spelling it funny while confusing all the other developers who have to deal with your code and making it incompatible with language constructs like the nullish coalescing operator.
If the concept you are trying to express is “null”, then please use null to represent that instead of bringing in a poor substitute like an overloaded false.
- anuila 6y agoNo, most likely I'll just use undefined because my abstractions are not a complicated mess that need 2 null types. Found? string Not found? undefined
- JimDabell 6y ago> most likely I'll just use undefined You were telling people to use false and that’s what I was responding to. That’s why I quoted that part in my comment.