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

At 06:33 PM 8/2/98 -0500, you wrote:
>I took your advice and checked out the bookmarks (nice page by the
>way, i'm still looking for that virus :), and you were right (well
>actually, I was right :) - I was missing something. I guess I'm
>still a C programmer at heart... I don't like the way all those
>operators are switched around, too confusing. But I agree, there
>are some pretty nifty advantages to using STL-like iterators. The
>problem is, to use those advantages sometimes can produce code bloat,
>because of the heavy use of templates. I still think templates are
>evil, since if you use them for more than one data type you get a
>copy of all the functions for each data type used. Void*'s are much
>more handy for things like linked lists.

Actually, I believe that most of the STL is written as inline
functions. It is dependent on the compiler you use if these
become actual functions, but the STL code seems fairly compact

One thing that the STL does give you, as opposed to the (void *)
pointers, is it doesn't have to store the pointer to the data,
wich saves you 4 bytes (or more) of storage for each node.
If you have a fairly large list, the savings in (data space)
memory can be subatantial. (You may think of it as trading
code space for data space).
Kevin Handy         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]