Re: [gtk-list] Re: Gtk--: G_List quirks

On 2 Aug 1998, Tero Pulkkinen wrote:

> > Side note : don't do that. Use iterators :
> > 
> > 	list = container->children();
> > 	for(iter = list->begin(); iter != list->end(); ++iter) { ... }
> I would prefer if people used the iterator approach... Its much
> better... Though it should be improved to allow also modifying the
> list through it. (maybe removing next(), prev() and those would be ok?
>:) (though some of those other wrapped functions are useful for people
> who dont want to depend on STL's algorithms...)

Ewwww no, I hate iterators :). I don't really understand the point of
them; they just use fancy operators to traverse through lists. What's the
difference between doing
    lptr = lptr->next;
? Of course I'm probably missing some advantage to them, but even so, they
are just a fancy way of saying 'I spent a lot of time coding my linked
list', when the same thing could be accomplished without them.

Matt Perry []

Educational television should be absolutely forbidden.  It can only lead
to unreasonable disappointment when your child discovers that the letters
of the alphabet do not leap up out of books and dance around with
royal-blue chickens.
                -- Fran Lebowitz, "Social Studies"

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