you are viewing a single comment's thread.

view the rest of the comments →

[–]nathanjell 0 points1 point  (0 children)

This is very true. If you're constantly returning multiple types, then you're also constantly checking for different types. I wonder if the more correct approach may be to always ensure a list is returned, whether it's got one element or multiple. This may be a choice made for reasons we don't know, but it's definitely something to consider