Well, if we measure consensus by the lack of protests, then yes. I at least thought it could be worthwhile to replace "_m_delete" with a better name, although I don't have a strong opinion either for or against that.
/ Martin Stjernholm, Roxen IS
Previous text:
2002-11-09 04:13: Subject: More about ADTs
int [Sequence::]delete_at(int ind)
Remove the item at the index ind. The size of the sequence is decreased by one and the items above ind have their indices decreases by one. Return 0 if the removal failed. Throw an error if ind is out of range.
In addition to Mast's good and thorough analysis, I'd like to add two ponderings here. First, returning the value corresponding to the index being deleted is IMO a too valuable convenience to leave out (it was added to m_delete for mappings a while back, as a way of eating off configuration options and similar from a mapping, for further processing, and the like). If the case of removal failure can happen, for some reason, returning UNDEFINED would feel more in line with how a mapping would have behaved, if the range check doesn't to cover that problem.
Second (and now I address a wider public): was there some form of consensus about not naming this _m_delete, for the sake of the somewhat annoyingly ugly prefix? And in that case, was some other LFUN for delete operations under consideration?
/ Johan Sundström (ärkehertig av Lysators rootgrupp)