Redesigning collections

608 views
Skip to first unread message

martin odersky

unread,
Oct 5, 2015, 8:59:37 AM10/5/15
to scala-l...@googlegroups.com
A redesign of the standard library is on the roadmap for one of the
next Scala versions (could be as early as 2.13). So I think now is the
time to start thinking about what we want to change, in particular in
what concerns collections!

Collection libraries have to address at the same time many criteria;
it usually makes little sense to consider individual changes in
isolation. To make progress, I propose to embark on a set of strawman
proposals that are of manageable size yet can illustrate key aspects
of potential collection designs. More details are found here:

https://github.com/lampepfl/dotty/issues

I'd be happy to see

- concrete implementations of the proposed API
- discussions how we should change or flesh out the API

Cheers

- Martin


--
Martin Odersky
EPFL

martin odersky

unread,
Oct 5, 2015, 9:00:24 AM10/5/15
to scala-l...@googlegroups.com
Correction: The full link to the proposal is here:

https://github.com/lampepfl/dotty/issues/818

- Martin
--
Martin Odersky
EPFL

Paul Hudson

unread,
Oct 5, 2015, 9:15:14 AM10/5/15
to scala-l...@googlegroups.com
Why (apart from consistency across collection implementations) do you require foldRight on Iterator in the strawman? I can't think of a way of implementing it that doesn't require exhausting the iterator, and storing the result somewhere, probably as one of the other collection types.  So it' s not really much to do with Iterators. 

So it seems unlikely to be an interesting or revealing thing for any strawman proposal.

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

martin odersky

unread,
Oct 5, 2015, 10:05:37 AM10/5/15
to scala-l...@googlegroups.com
On Mon, Oct 5, 2015 at 3:15 PM, Paul Hudson <phu...@pobox.com> wrote:
> Why (apart from consistency across collection implementations) do you
> require foldRight on Iterator in the strawman? I can't think of a way of
> implementing it that doesn't require exhausting the iterator, and storing
> the result somewhere, probably as one of the other collection types. So it'
> s not really much to do with Iterators.
>
I added some explanation. Iterators are not considered collections, so
they do not necessarily have the same operations as other collection
types. In fact, nothing is specified about what operations an iterator
should support.

- Martin
--
Martin Odersky
EPFL

Simon Ochsenreither

unread,
Oct 5, 2015, 11:48:32 AM10/5/15
to scala-language

martin odersky

unread,
Oct 5, 2015, 12:00:32 PM10/5/15
to scala-l...@googlegroups.com
I noted that discussion around collections has picked up. This is great!

- Martin

Eric Richardson

unread,
Oct 13, 2015, 10:18:07 PM10/13/15
to scala-language
Hi all,

If Java Compatibility is a consideration then notice the point made here under that title. 
Reply all
Reply to author
Forward
0 new messages