ListSplit
832
Views
6
Comments
New

I'd love to have a ListSplit System Action, that performs a ListFilter, but also outputs all the other elements in a second list. So say I have a List with an Attribute "Value" and the input to ListSplit is "Value > 1000", I'd get two lists, one with all Values upto 1000, and one with all Values above 1000.

I like this idea, there are several situations where we want both lists.

I like the idea as well, although I would suggest to extend the existing ListFilter instead.

This is because using the existing action, ListFilter, allows dynamic condition, and what we simply need from this is to have access to what is left after the filter.

Not sure what you mean. Like I wrote, this would be a ListFilter, but outputs the remainder as well. Extending the ListFilter would incur a performance penalty, so I wouldn't be in favour of that.

Why would it incur performance penalty? It is possible to add a Boolean input parameter, e.g. GetRemainder, which will determine if this extended feature will implement. By default this would be set to false, since only specific scenario would require such functionality.

Overloading functions with extra parameters is, in general, a bad decision. Having seperate, related, functions is better.

I see... Alright then :)