Re: [Vala] Libgee's Roadmap proposal



Hi,

Jiří Zárevúcky wrote:
2009/7/21 Didier "Ptitjes" <ptitjes free fr>:
Hi list,

Didier "Ptitjes" wrote:
Open questions:
I'd like to add some more ideas:
 - Support for disengageable collection change events

Sounds interesting, but I'm not sure about a real value.

Often one needs to describe collection changes. One element has been
inserted, removed, some elements have been removed. Often, one recreate
such a event description classes and listening framework.

Offering such a feature at the core of the collections would be a must
and avoid that many people do twice the same.

Also, based on the GLib signals, firing collection changes feels natural.

 - Support for collection updatable views (aka wrappers)
 - With events and views, we gain a clean implementation way for sorted
list views

I don't understand what you mean. Could you explain a bit more?

Based on events, one can create a view|wrapper class that registers to
its delegate for collection changes. It can then do proper use of the
change to keep coherence in the view it gives to the user.

Use of this architecture can enable multiple views of the same
collection, and thus for instance provide different sortings of the same
data.

 - Collection shuffling

I suppose this would be useful only in very specific applications.

This is for sure not a priority at all.

 - Collection reversing

Definitely a must-have.

 - Reversed iterations

The same here.

 - Collection-based addition|removal (add_all, remove_all, retain_all)
 - ^^^ Same for maps (set_all)

Maybe we could generalize it a bit and implement some basic set of set
operation (no pun intended). Union, intersection, difference, etc. In
any case, it has to be implemented on the level of Collection
interface.

In fact, as shown in C5 documentation, union, intersection, ...
set-based operations are implementable with by one call of add_all,
remove_all, or retain_all on a Set object. Please look at the C5
documentation for more details. Thus I would prefer to have the basic
ones (add_all, remove_all and retain_all) which have proper semantics
for all collections. (What does mean union for an arbitrary collection ?)

Best regards, Didier.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]