eclipse-archived / ceylon-sdk

Standard platform modules belonging to the Ceylon SDK
http://www.ceylon-lang.org
Apache License 2.0
72 stars 60 forks source link

Sublist, Submap, Subset, SortedSubset, SortedSubmap #180

Open gavinking opened 10 years ago

gavinking commented 10 years ago

Add classes Sublist, Submap, Subset, SortedSubset, SortedSubmap providing partial views of Lists, Maps, Sets, SortedSets, and SortedMaps respectively.

One complication here is that for lists, sorted maps, and sorted sets, there are two different kinds of subview: filtered by range, or filtered by predicate function, and for efficiency they should be treated differently.

pthariensflame commented 10 years ago

This might be a way for me to get started actually hacking on Ceylon, rather than just making suggestions. :)

I'll look into it. This is not a "dibs" call, by any means.

gavinking commented 10 years ago

Sure, I'm not planning to work on it immediately.

One thing to be aware of: working in the now rather large ceylon-sdk project with the 1.0 IDE is a bit awful, due to slow build performance. OTOH, with the current version in github, where performance is much improved, I'm getting lots of incremental build bugs which require regular Clean builds. It's bearable but annoying.

So if you're going to work on this stuff, and you want to use the IDE, I would say write your code in your own project, and don't load ceylon-sdk into your workspace for now.

(All this should be fixed by the time 1.1 comes out.)

pthariensflame commented 10 years ago

Advice taken, thanks!

gavinking commented 10 years ago

Note that we now already have List.subList() in the language module, for filtering by range.

Anyway, this is not for 1.1.