Hi, first of all, I'm against killing the Qt container classes. Let me explain, why this is bad:
I agree with the fact, that in Qt3 classes like QValueList somewhat forced the developer to misuse it to create some kind of set. The trolls might have had something similar in mind, when designing the Qt4 API. Just have a look at the new API for container classes: http://doc.trolltech.com/4.5/containers.html#container-classes and you will mention the direction. There now is QSet, which is a QHash based implementation to provide a container to store sets with fast look-ups. Sometimes order is important, so there is QMap (that has been there already in Qt3 with slightly different API). So again: nowadays Qt provides a nice set of container classes, very easy to use. Another thing the Qt classes guarantee is thread-safety. I'm not sure about the implementation of the STL container classes, the methods might be reentrant as well, also I have in mind, that definitions about reentrance and thread-safety sometimes differ in some subtle way. There are 2 ways of using the Qt container classes in Qt4. "The Qt way" and "STL way". The difference is in speed (Java-Style Iterators are slightly more inefficient) and readability (STL Iterators are sometimes hard to read, especially for newbies and there are more possibilities of "doing it wrong" [see trolltech documentation page i mentioned earlier]). Another thing to mention is that you can use Qt container classes together with STL's generic algorithms. Also Qt provides own implementations (which should probably be preferred, to reduce number of libraries) there might be some rare cases, where you need STL algorithms. When using STL containers, you are stuck to their algorithms lib. So as you might see, the situation will change, when switching to Qt4 container classes. For the simulator I'd also suggest to use the Qt classes and may be do critical implementations using STL Iterators. I for my self prefer readability over speed, especially if the differences are small. I guess the difference isn't noticeable in most of the cases and well, if so, there is the possibility to make it slightly more efficient. well, just my 2ct Julian
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________ Ktechlab-devel mailing list Ktechlab-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ktechlab-devel