title: Does it make sense to have a `private` constructor field in a `case class`?
body: <p>I see some Scala code like this:</p>
  
  <pre><code>case class Team(private val members: List[User]) {
      def removed(member: User): Team = {
          Team(members.filterNot(_ == member))
      }
      def added(member: User): Team = {
          Team(member :: members)
      }
      def allNames: List[String] = members.map(_.name)
  }
  </code></pre>
  
  <p>You can see the <code>Team</code> is a <code>case class</code>, but it has a <code>private</code> field <code>members</code>. And in the body, it has several methods to construct a new <code>Team</code>, and a method <code>allNames</code> which export some information of the private <code>members</code>.</p>
  
  <p>I'm not sure if the usage of <code>case class</code> is good, since I think a <code>case class</code> is a data class, we should not use <code>private</code> fields. For this case, I think a normal class is enough:</p>
  
  <pre><code>class Team(members: List[User]) {
      def removed(member: User): Team = {
          new Team(members.filterNot(_ == member))
      }
      def added(member: User): Team = {
          new Team(member :: members)
      }
      def allNames: List[String] = members.map(_.name)
  }
  </code></pre>
  
  <p>You can see I removed the <code>case</code>, and also <code>private</code> since for a normal class, the fields of constructor is private by default.</p>
  
  <p>But I'm not sure if there is any good reason to write the code in the first approache.</p>