Re: STL / Qt flame-war (Re: [linux-audio-dev] Audio-related widgets with Qt ?)

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: STL / Qt flame-war (Re: [linux-audio-dev] Audio-related widgets with Qt ?)
From: Paul Davis (pbd_AT_Op.Net)
Date: Mon Sep 17 2001 - 18:50:58 EEST


>Sorry, IMHO STL exemplifies the phrase ``too clever by half.'' It
>really needed another round of design before being released... as my
>favorite example of ``things that bit me,'' if you cast a forward
>iterator to a reverse iterator you get, not an iterator pointing to
>the same list element, but one pointing to the previous list element.
>On the other hand, when you cast a reverse iterator to a forward
>iterator you get... oops! can't do that!

cast a forward iterator to a reverse iterator? what in the world were
you thinking? do actually mean cast, or do you mean construct a
reverse iterator using a forward iterator?

>The STL concept is very powerful, but its implementation is so full of
>unexpected inconsistencies that it is a royal PITA.

*an* implementation, rather than *its* implemenation. i have my
complaints about the GNU implementation, and i've heard other things
about the Rogue implementation as well. but i've heard similar things
about many other kinds of libraries, and that doesn't stop me from
using them. it means that i work around them. for example, i know that
the GNU List::size() function is O(n), which is sometimes
unacceptable. So I work around it with a counter variable, and if
necessary, a mutex (which is needed anyway for MT work with the STL,
since the objects themselves are not MT-safe, but can be derived from
to make them so when appropriate; a much more efficient approach than
building locks in all over the place).

my apologies for starting this. mea culpa.

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Sep 17 2001 - 18:50:43 EEST