Typically, we use null
to mean "unspecified" or "nonexistent" or "not applicable." Thus, in the case of a filter, it makes sense to allow null, because it means "no filtering."
In addition, an enumeration called Regions
probably has values such as Northeast
, Southeast
, Midwest
, Southwest
and West
. Now, please correct me if I am mistaken, but I do not think that in the USA there is some region called "Everything". During my many years of stay there, I heard the weatherman on television talking about the weather in the West, about the weather in the southeast, etc., but never about the weather in some place called "Everything." Therefore, I am inclined to believe that there is no such region. Therefore, including “Everything” in the list of regions, it’s a hack. Suddenly, the Regions
enumeration does not apply to regions; instead, it is about regions and / or their filtering. Shifts in meaning of this kind are what you need to know about in programming and, as a rule, avoid.
Mike nakis
source share