Re: [PATCH] GIterator



Havoc Pennington wrote:

Hi,

Just to add a dissenting voice - I think GLib containers probably
should have been done with iterators in the first place, but failing
that, IMO having two ways to do iteration adds too much extra
complexity to be worth it. It's better if there's only one way to do
it.

We would end up sort of pseudo-deprecating all the foreach()
functions, all functions that return a list, list->next style
iteration, etc., and that's just too much churn in the "recommended"
API set, even if the old API still works.
I agree that deprecating all functions not using iterators is not going to happen. But it would be useful to have this sort of functionality would be nice to have in glib for use by new APIs and inside apps/other libs using glib. The existance of GList didn't prevent the addition of GQueue, or plans to add a GRing type.

James.

--
Email: james daa com au              | Linux.conf.au 2003 Call for Papers out
WWW:   http://www.daa.com.au/~james/ |   http://conf.linux.org.au/cfp.html







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