On Wed, 2008-06-04 at 13:49 +0200, Mikkel Kamstrup Erlandsen wrote: > 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.
Sorry for the late response, I have to catch up with some mail lag. I like the idea of array slicing, I'm currently more concentrating on bug fixing and stabilization than new language features. > 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? We could certainly implement slicing support for classes implementing Gee.List without a new interface, however, it might not be the most efficient solution if we want to consider lazy loading. > * Strings and GStrings It should be pretty easy for strings as it's just different syntax for the substring method. > * GLib collection types, GArray, GPtrList etc. Needs to be special handled for each one of them, I wouldn't focus on that for now. You've missed the simple array case, however, that might also be the most problematic one regarding memory management. It should certainly be feasible for common situations, though. Juerg _______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
