On Wednesday 29 June 2011, Thiago Macieira wrote: > Em Wednesday, 29 de June de 2011, às 22:26:13, Robin Burchell escreveu: > > Why? I'm not sure I agree. Qt exists to make developers' lives easier, > > and even at the Qt3 -> Qt4 transition, when STL was fairly mature on > > many platforms, Qt kept their own container classes (for which I am > > very thankful, as they tend to provide a bit more convenience, > > although a lot of that is things like implicit sharing to make writing > > methods returning complex containers easier and foreach - for > > instance). And isn't this exactly what things like this are about? > > Convenience? > > > > If STL provides the same functionality in its basic containers, that's > > great, but we shouldn't limit ourselves to someone else's subset of > > functionality, should we? > > I'm not saying anything about the STL containers, I'm saying we should > use the STL algorithm functions that perform those tasks. We should even > implement our functions as wrappers to the STL ones if possible, as the > compiler writers probably did the best job possible. > > Unlike the containers, where we disagree on some basic functionality > semantics, there aren't many ways to implement a linear search or a > binary search. So why not use the STL functions there?
So let's implement those methods as wrappers where possible, but let's
implement them.
It feels much more natural to write something like mylsist.contains(...)
than qContains(mylist,...) - Qt is supposed to be object oriented after all.
Konrad
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
