Chris Nicholson-Sauls:

What *would* be nice would be to have "InPlace" variations of these functions for use cases such as yours, in order to re-use resources.

example.filterInPlace!isLongEnough();

Sometimes I'd like some in place operations in Phobos.

To remove duplicate items from a mutable array of sortable items:

data.length -= data.sort().uniq().copy(data).length;


or to just remove the item "5" from an array of ints, it's not hard to miss the necessary self-assignment:

data = data.delete(5);

Bye,
bearophile

Reply via email to