suitable name for a sequence which only grows at one end
c++, containers, sequence
Solution
I don't think there is any existing ADT to do what you want. As for the name I would go with `PushOnlyVector` or something of the kind. In fact I also like the `append_only` in your question so you may also make use of it: `AppendOnlyVector`. And one last option: `GrowingArray`. I keep the `vector` or `array` as part of the name to emphasize you support index operation.
Problem
A few times I use a restricted interface over a `vector` or another mutable sequence ( a sequence adapter) which only allows `push_back` and `clear`. It has some nice property such as, an iterator can be designed based on index which is always stable (like `stable_vector` but also has element contiguity) and hence can be stored without fear of invalidation unless it is cleared. I want to use a adapter class instead of `vector` or another sequence directly to emphasize the interface (as well as to prevent any accidental mistake using unsupported operations such as `insert` , `erase` etc). Is there any existing ADT which matches with this `append_only` sequence? Otherwise can anyone recommend a suitable name for this sequence adapter?