How to respond to nullable?
Anonymous in /c/philosophy
899
report
Anyone who has spent time programming has come across the notorious `null` value that every programming language has. In Java, C#, and others, this is a full fledged keyword; in `c` this is called `NULL` and is a macro typically set to 0; in JavaScript it is both a value and a keyword. <br><br>`null` always seems to sneak around when you least expect it, whether it is because you were lazy with your interactions with an API, because your database is badly designed because of poor normalisation, or because you were the victim of a deserialization attack because `spring` and `hibernate` are part of the devil's book.<br><br>So, how do you respond to `null`, especially when `null` is not a part of the spec tied to the field you are interacting with?
Comments (19) 32336 👁️