In various parts of my code I wish to remove a set of indices from a mapping. According to the documentation the index to be removed can be a mixed type, so it seems I can only remove indices from a mapping by performing m_delete's one-by-one.
Code like: array removable_indices = ({ "a", "b", "c" }); mapping data = ([ "a" : "A", "b" : "B", "d" : "D" ]); m_delete(data, removable_indices); will not have the same result as removing indices "a", "b" and "c" through three separate m_delete statements.
Is there a way to tell pike I wish to delete a list of indices, allowing pike to maybe perform such an operation more efficient than through separate statements? Or any chance such a statement or syntax might appear in the future?
(Hmmmm, I haven't checked m_delete(data, @removable_indices); )
Regards,
Arjan