Implement placement-in protocol for LinkedList
by apasel422 · Pull Request #31696 · rust-lang/rust (original) (raw)
Oh I guess we don't have any prior art here (sorry I thought we had these implemented for vectors).
In terms of naming, we'll probably want to have a convention like iterators where it's super straightforward and you don't have to think about it much. Along those lines maybe something like:
- All "placer" methods have some shared word in them. Perhaps
place
oremplace
(I don't have much of an opinion either way) - Each collection may have a suite of placer methods, and if so they've all got some other prefix/suffix indicating how the placement is happening. Again, on whether it's a prefix/suffix I don't have much of an opinion
- The returned struct has the exact same name as the method, but in camel case
So I guess within those guidelines, I'd recommend renaming the returned structs, and otherwise keeping the names as is or the front_place
/back_place
suggestions @petrochenkov mentioned.