DEV Community

Discussion on: You don't need null

Collapse
 
grahamthedev profile image
GrahamTheDev • Edited

Definitely food for thought!

I personally over rely on null as it works so nicely with databases, but that is just laziness on my part and you are right that stripping null values instead of validating them (which does require some thought so you don’t open a massive security hole) does seem cleaner!

Next side project going to give this a go!

Now can you please stop this series as I am running out of things I can use! 😜🀣

Collapse
 
loucyx profile image
Lou Cyx

Let me know if you hit any wall while trying to get rid of those nulls, and I'll do my best to help out. In my personal experience I even noticed some speed bumps in requests/responses because payloads were always smaller πŸŽ‰

Collapse
 
grahamthedev profile image
GrahamTheDev

Thanks Luke, great to know as I am sure there will be something and I imagine there won’t be much out there in terms of advice on something like this! πŸ‘

Some comments have been hidden by the post's author - find out more