That\'s kind of a general question (but I\'m using C#), what\'s the best way (best practice), do you return null or empty collection for a method that has a collection as a
Returning null could be more efficient, as no new object is created. However, it would also often require a null check (or exception handling.)
Semantically, null and an empty list do not mean the same thing. The differences are subtle and one choice may be better than the other in specific instances.
Regardless of your choice, document it to avoid confusion.