3 ms·
Can anyone more familiar with the matter tell me what is wrong with the parallel collections? Does he plan to reimplement them in a more maintainable way? Or do
by saosebastiao 12y ago
Can anyone more familiar with the matter tell me what is wrong with the parallel collections? Does he plan to reimplement them in a more maintainable way? Or do away with them altogether?
All the talk about scala makes me wonder what the language would have looked like if Java compatibility was never a goal. I'm no language designer and I'm probably wrong but some things that come to mind are 1) no nulls, 2) no distinction between classes and their companion objects, 3) no distinction between traits and abstract classes.
- bkirwi 12y agoFor a short answer to the first question, see his slides on the collection library[0], particularly number 42. The gist is that the Scala collections have too many dimensions (mutable/immutable, sequential/parallel, strict/lazy), all of which share code -- but it turns out that the right implementation for a lazy immutable parallel collection is not necessarily good for a strict mutable sequential collection, and juggling all these variations makes it much trickier to modify or reason about the code. He seems to be fine with the existence of parallel collections, but probably as something that lives on top of the standard library instead of being layered into it. To your second paragraph -- I believe that #2 might have found its way into a Scala-from-scratch, but the others certainly wouldn't. I think the big difference would be in the type system, which could be much simpler if it didn't have to interop with Java's weird generics. [0] http://www.slideshare.net/extempore/a-scala-corrections-library http://www.slideshare.net/extempore/a-scala-corrections-libr...
- deleted 12y ago[deleted]