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



At 06:13 PM 8/1/98 -0500, you wrote:
>On 2 Aug 1998, Tero Pulkkinen wrote:
>
>
>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;
>and
>    ++liter;
>? 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.

One advantage to iterators, is that the underlying list structure
can be replaced (maybe with a hash), and your program will still
work without any code changes.

You never know what someone might want to do to the base code to
improve the speed of common operations. STL iterators let's you
play with different list structures to find which one works best
for your application.
-------------------------------------------------------------
Kevin Handy  kth@srv.net         Accounting Software for
Software Solutions. Inc.         VAX/VMS Computer Systems
Idaho Falls, Idaho



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