Since a slice is a reference it can be annoying to keep IdentifierLists in memory since callers will need to keep the original list around for as long the IdentifierList is needed.
I'm not 100% sure this is a best approach (if the list is big, it may require the caller to make a clone of it) but it seems to make more sense.
We should also review the API for similar usages.
Note that this is different to a e.g. function that takes a slice/reference but does not keep it around. In that case it's better to use slices/references since the caller can decide what to pass to it.
Since a slice is a reference it can be annoying to keep IdentifierLists in memory since callers will need to keep the original list around for as long the IdentifierList is needed.
I'm not 100% sure this is a best approach (if the list is big, it may require the caller to make a clone of it) but it seems to make more sense.
We should also review the API for similar usages.
Note that this is different to a e.g. function that takes a slice/reference but does not keep it around. In that case it's better to use slices/references since the caller can decide what to pass to it.