Hi Valists, I am very much enjoying array slicing[1] in Python and I am contemplating having a stab at implementing it for Vala. However I would like a bit of feedback before I start spending too much time on it. It looks like it may require a lot of work.
I see three cases where it can be applied, each probably having to be handled separately... * Libgee collections. This may require a new interface for libgee, fx Slicable? * Strings and GStrings * GLib collection types, GArray, GPtrList etc. Is this feasible at all, considering ref counting issues, collections of simple types etc. etc. ? Cheers, Mikkel [1]: If you have the array A = ['a', 'b', 'c', 'd'] then there are three ways to slice it (this is the Pythonic interpretation btw): - A[1:3] is ['b', 'c'] - A[1:] is ['b', 'c', 'd'] - A[:1] is ['a'] The invariant is A = A[:n] + A[n:]
_______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list