title: LinkedList vs MutableList in scala
body: <p>Below, both descriptions of these data structures: (from <em>Programming in scala</em> book)</p>
  <blockquote>
  <p><strong>Linked lists</strong></p>
  <p>Linked lists are mutable sequences that consist of nodes
  that are linked with next pointers. In most languages null would be
  picked as the empty linked list. That does not work for Scala
  collections, because even empty sequences must support all sequence
  methods. LinkedList.empty.isEmpty, in par- ticular, should return true
  and not throw a NullPointerException. Empty linked lists are encoded
  instead in a special way: Their next field points back to the node
  itself. Like their immutable cousins, linked lists are best operated
  on sequen- tially. In addition, linked lists make it easy to insert an
  element or linked list into another linked list.</p>
  <p><strong>Mutable lists</strong></p>
  <p>A MutableList consists of <strong>a single linked list</strong> together with a pointer
  that refers to the terminal empty node of that list. This makes list
  append a con- stant time operation because it avoids having to
  traverse the list in search for its terminal node. MutableList is
  currently the standard implementation of mutable.LinearSeq in Scala.</p>
  </blockquote>
  <p>Main difference is the addition of the last element's pointer in <code>MutableList</code> type.</p>
  <p>Question is: What might be the usage preferring <code>LinkedList</code> rather than <code>MutableList</code>? Isn't <code>MutableList</code> strictly (despite the new pointer) equivalent and even more practical with a tiny addition of used memory (the last element's pointer)?</p>