Re: [PATCH] GIterator

Havoc Pennington wrote:


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

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.


Email: james daa com au              | 2003 Call for Papers out
WWW: |

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