- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: Re: Difference between List and Set variance?
Sun, 2011-05-29, 22:13
On the issue of sets, I believe the non-variance stems also from the implementations. Common sets are implemented as hashtables, which are non-variant arrays of the key type. I agree it's a slighly annoying irregularity.
-- Martin
On Sun, May 29, 2011 at 11:09 PM, martin odersky <martin [dot] odersky [at] epfl [dot] ch> wrote:
--
----------------------------------------------
Martin Odersky
Prof., EPFL and CEO, Typesafe
PSED, 1015 Lausanne, Switzerland
Tel. EPFL: +41 21 693 6863
Tel. Typesafe: +41 21 691 4967
-- Martin
On Sun, May 29, 2011 at 11:09 PM, martin odersky <martin [dot] odersky [at] epfl [dot] ch> wrote:
On Sun, May 29, 2011 at 1:23 AM, Kris Nuttycombe <kris [dot] nuttycombe [at] gmail [dot] com> wrote:
I'd like to chime in that I too think inheritance from the variousI think it's too late for that. We really have to take binary compatibility more seriously than up to now. And that means more or less freezing collections. Some small improvements, maybe, but there will be no more changes in the design.
function types (for Map, List, Set, etc.) is wrongheaded and overly
limiting; implicits would be vastly preferable and could be
implemented without breaking source compatibility in most cases, as
was done with the collections library in 2.8.0. Much like equality,
one very frequently wants function semantics of collections to be
contextual and unrelated to the inheritance hierarchy.
Is there any chance of such a change being considered?
-- Martin
--
----------------------------------------------
Martin Odersky
Prof., EPFL and CEO, Typesafe
PSED, 1015 Lausanne, Switzerland
Tel. EPFL: +41 21 693 6863
Tel. Typesafe: +41 21 691 4967
Sun, 2011-05-29, 23:27
#2
Re: Re: Difference between List and Set variance?
On Sun, May 29, 2011 at 11:54 PM, Meredith Gregory <lgreg [dot] meredith [at] gmail [dot] com> wrote:
Dear Martin,
Thanks for your input! If i understand correctly, it will be up to the community to grow some separate Set-like collections with consistent variance; and, if needed, provide views of these collections as functions. That sounds like a worthy task!
Also, just for my own understanding, can you provide pointers to information about the approach to binary compatibility?
Mirco Dotta has recently categorized what incompatibilities can arise. He might be the best source to give more info.
Cheers
-- Martin
Mon, 2011-05-30, 08:07
#3
Re: Re: Difference between List and Set variance?
> Also, just for my own understanding, can you provide pointers to information about the approach to binary compatibility?
We have developed a tool that will help you diagnose binary incompatibilities. We plan to get it out as a beta during Scala Days
(so just a few days from now!).
As for more detailed information on the sort of binary incompatibilities that the tool checks, I'm working on a document that I hope
will be soon public. It should help taking the right decisions when evolving your classes and traits. The form is similar to
Java's binary compatibility document (http://java.sun.com/docs/books/jls/second_edition/html/binaryComp.doc.html).
Of course if you have specific questions I'll be happy to answer them.
Cheers,
Mirco
Mon, 2011-05-30, 13:37
#4
Re: Re: Difference between List and Set variance?
Dear Mirco,
Thanks! i'm looking forward to your document and tool!
Best wishes,
--greg
On Sun, May 29, 2011 at 11:56 PM, Mirco Dotta <mirco [dot] dotta [at] gmail [dot] com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SWSeattle, WA 98136
+1 206.650.3740
http://biosimilarity.blogspot.com
Thanks! i'm looking forward to your document and tool!
Best wishes,
--greg
On Sun, May 29, 2011 at 11:56 PM, Mirco Dotta <mirco [dot] dotta [at] gmail [dot] com> wrote:
> Also, just for my own understanding, can you provide pointers to information about the approach to binary compatibility?
We have developed a tool that will help you diagnose binary incompatibilities. We plan to get it out as a beta during Scala Days
(so just a few days from now!).
As for more detailed information on the sort of binary incompatibilities that the tool checks, I'm working on a document that I hope
will be soon public. It should help taking the right decisions when evolving your classes and traits. The form is similar to
Java's binary compatibility document (http://java.sun.com/docs/books/jls/second_edition/html/binaryComp.doc.html).
Of course if you have specific questions I'll be happy to answer them.
Cheers,
Mirco
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SWSeattle, WA 98136
+1 206.650.3740
http://biosimilarity.blogspot.com
Thanks for your input! If i understand correctly, it will be up to the community to grow some separate Set-like collections with consistent variance; and, if needed, provide views of these collections as functions. That sounds like a worthy task!
Also, just for my own understanding, can you provide pointers to information about the approach to binary compatibility? i'd like to verify for myself that Kris proposal cannot be made to work in a way that supports binary compatibility.
Best wishes,
--greg
On Sun, May 29, 2011 at 2:13 PM, martin odersky <martin [dot] odersky [at] epfl [dot] ch> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SWSeattle, WA 98136
+1 206.650.3740
http://biosimilarity.blogspot.com