What would be the best Scala collection (in 2.8+), mutable or immutable, for the following scenario:
- Sequentially ordered, so I can access items by position (a Seq)
- Need to insert items frequently, so the collection must be able to grow without too much penalty
- Random access, frequently need to remove and insert items at arbitrary indexes in the collection
Currently I seem to be getting good performance with the mutable ArrayBuffer, but is there anything better? Is there an immutable alternative that would do as well? Thanks in advance.