PHPnews.io

It's not Null, it's Enum

Written by Tomáš Votruba / Original link on Feb. 22, 2021

Last weekend I got into reading a good old post Null Hell by Afilina, a fellow legacy archeologist. Null parameters are evil, which turns code into "maybe" and "just in case" conditions with ifs everywhere.
I was wondering how difficult it is to get rid of nullable parameters in a project. I made myself a challenge: get rid of nullable params over the weekend. This is what happened.

tomasvotruba

« Harpoon: Next generation time tracking and billing - Over the past few years, cops sure have become increasingly... »