DEV Community

Discussion on: Code Smell 145 - Short Circuit Hack

larsejaas profile image
Lars Ejaas

But we are not always writing the data or code with null ourselves.

One example: Auto-generated types made with GraphQL Code Generator.
We still need to be able to handle null.
Null does indeed make sense if you do not know if data will return empty.

Thread Thread
mcsee profile image
Maxi Contieri Author

Of course
In case null is beyond your own control you need to deal with it

That is why it is the billion dollar mistake

We must be mature enough to avoid creating NEW nulls

Thread Thread
larsejaas profile image
Lars Ejaas

Yeah, that makes sense 😄