- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: Reusing UniquenessCache implementation
Mon, 2011-01-31, 20:03
On Mon, Jan 31, 2011 at 10:51:24AM -0800, Thomas Sant'ana wrote:
> I was doing some testing concerning memory usage and I happened to
> notice that Symbol use the fly-weight pattern. I also found the
> implementaion of UniquenessCache very elegant.
Now there's a refreshing change of pace. It's easy to become accustomed
to only hearing of one's code with one or more of "incompetent", "boob",
and "manifestly unfit even to own a keyboard" tacked on somewhere. (Not
that it isn't character building.)
> I tryed to do the same thing extending the scala.UniquenessCache but
> class is package private. I have two questions:
>
> 1) Is there a public implementation of this same thing elsewhere in
> the scala library?
>
> 2) If I copy the code over, what is the correct you to refer to the
> original code? And will licensing be an issue? My project is GPL.
There is no other implementation. That one is only package private
because there is a substantial tax associated with any code I put in the
library, to be levied in perpetuity, and I'm not always eager to pay it.
Licensing is not an issue but if you're GPL the movement is
unidirectional. I can't answer the question about how to refer to it.