Which scala mutable list to use? - Stack Overflow
stackoverflow.com › questions › 11049213Jun 15, 2012 · MutableList is used internally, you usually do not use it unless you plan to implement a custom collection class based on the singly linked list data structure. Mutable queues, for example, inherit this class. MutableList class also has an efficient constant-time append operation, because it maintains a reference to the last node in the list. Share
Mutable and Immutable Collections | Collections (Scala 2.8 ...
docs.scala-lang.org › overviews › collectionsScala collections systematically distinguish between mutable and immutable collections. A mutable collection can be updated or extended in place. This means you can change, add, or remove elements of a collection as a side effect. Immutable collections, by contrast, never change. You have still operations that simulate additions, removals, or updates, but those operations will in each case return a new collection and leave the old collection unchanged.
ListBuffer: How to create a mutable List in Scala ...
alvinalexander.com › scala › how-to-create-mutableOct 11, 2020 · The ListBuffer Scaladoc states that a ListBuffer is “a Buffer implementation backed by a list. It provides constant time prepend and append. Most other operations are linear.” So, don’t use ListBuffer if you want to access elements arbitrarily, such as accessing items by index (like list(10000)); use ArrayBuffer instead. See Recipe 10.4, “Understanding the Performance of Collections” for more information.