Returning an empty list or empty array is different from returning no list at all.
Imagine I want to query a database of tagged articles. Let's say I want to get articles with an exact set of tags.
Passing this method [A, B] will give me articles with tags A and B, passing this method [] will give me articles with no tags. Not specifying the query parameter at all will result in no parameter. I could use a boolean value to keep track of that or just use an optional.
Imagine I want to query a database of tagged articles. Let's say I want to get articles with an exact set of tags.
Passing this method [A, B] will give me articles with tags A and B, passing this method [] will give me articles with no tags. Not specifying the query parameter at all will result in no parameter. I could use a boolean value to keep track of that or just use an optional.