News for hackers. Stuff that matters.
Re:Policy – A fork of the Scala compiler by runT1ME on Saturday September 06, 2014 @05:36PM (#8279564)
The collections library itself is probably one of the worst things about scala.

I've ranted on the mailing list before, but it's overuse of inheritance rather than a type class based approach kills reasoning and modularity. Subtype polymorphic collections libraries are unquestionably a failed experiment.

Re:Policy – A fork of the Scala compiler by frowaway001 on Monday September 08, 2014 @02:20AM (#8283624)
I like dynamic dispatch. Having code which suddenly changes the implementation based on type ascriptions is just not what I want in this case.

Apart from that, I think collections can be improved considerably even while keeping dynamic dispatch.

Re:Policy – A fork of the Scala compiler by eeperson on Saturday September 06, 2014 @07:41PM (#8279879)
Why do you feel that it is a failed experiment? As a user of the collections, it seems to me to work out. Is it more of a problem with the implementation of the collections?
Re:Policy – A fork of the Scala compiler by runT1ME on Monday September 08, 2014 @04:33PM (#8287061)
I should have added that despite me not liking the std lib collections library, it's still stands above all other collection libs I've used in other languages.

The problem is that the std. lib collections tries to unify mutable/immutable and lazy/eager/finite/infinte datastructures into one class hierarchy. So you have methods like "size" or "add" on generic interfaces that mean different things depending on the implementation. So the entire abstraction ends up being leaky.

Scalaz has a few common implementations of immutable, eager data structures and ends up using a type class approach to modularity and code reuse that ends up not being leaky, it's a joy to use.

I don't think there's anything wrong with using the collections, just be aware that if you run into some edge cases, it's not the language, it's design choices made by the library writer and there may be better implementations.

Re:Policy – A fork of the Scala compiler by zak_mc_kracken on Sunday September 07, 2014 @10:33AM (#8281222)
Agreed. There is a vocal minority of people (academics mostly) yelling at how subtype polymorphism is broken and unusable. It certainly has broken aspects (with respect to equality) but by and large, it's extremely usable, intuitive and it enables powerful abstractions. The corner cases where it falls apart seem to be irrelevant for most uses.