Actually, it's funny that you mention that. Today I saw a pull request come
in for Scala's new pickling support that attempted to make classes private
that were not intended for external consumption. The initial approach was
to mark things as "private[pickling]", but someone commented that you can
actually still get access to them if you do something like "import
pickling._" (there's some esoteric bug that was linked to). So, instead he
suggested putting these private classes in an "internal" package like this:
https://github.com/scala/async/tree/master/src/main/scala/scala/async/internal


On Fri, Oct 11, 2013 at 2:16 PM, Jonathan Coveney
<notifications@github.com>wrote:

> In
> storehaus-cache/src/main/scala/com/twitter/storehaus/cache/LIRSCache.scala:
>
> > + * limitations under the License.
> > + */
> > +
> > +package com.twitter.storehaus.cache
> > +
> > +import scala.collection.SortedMap
> > +import scala.annotation.tailrec
> > +
> > +object Stack {
> > +  def apply[K](maxSize:Int,
> > +               backingIndexMap:SortedMap[Int, K] = SortedMap.empty[Int, K],
> > +               backingKeyMap:Map[K, Int] = Map.empty[K, Int]) =
> > +    new Stack[K](maxSize, backingIndexMap, backingKeyMap)
> > +}
> > +
> > +sealed class Stack[K](maxSize:Int, backingIndexMap:SortedMap[Int, K], backingKeyMap:Map[K, Int]) {
>
> Oscar didn't love all the privates. He suggested tossing it all in a
> private class if I really care, otherwise just leaving it. What do you
> think is the best way? I just don't want people to depend on internals.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/twitter/storehaus/pull/155/files#r6927010>
> .
>