Google Summer of Code 2006 Project proposals
Hamish Rodda
rodda at kde.org
Tue Apr 25 15:21:11 UTC 2006
On Tuesday 25 April 2006 22:35, Kuba Ober wrote:
> > > > I don't think that there's anything lacking in the C++ library
> > > > documentation nor implementation departments, so please tell me how
> > > > moving from a container library that's part of the language standard,
> > > > and is built upon in numerous boost extensions, to a container
> > > > library that comes with Qt is good?
> > >
> > > A few reasons in this case:
> > > 1) The use of template classes made the code difficult to read
> > > 2) The use of iterators (in particular, the frequent copying and
> > > assignment of iterators) made it difficult to follow the program's
> > > logic 3) I was unable to locate bugs that had gone unfixed for some
> > > time with the old code
>
> Rephrasing: you're inexperienced. "Difficult to read", "difficult to
> follow", "unable to locate bugs": it's all true in your case, and that's
> about it. I don't mean "inexperienced" in a derogatory sense. It's merely
> an observation. There are people who read template code just fine, and they
> are no better/worse than you, of course, so don't get me wrong. It's just
> that they have learnt the "template cleverness".
You don't think that any code can be difficult to follow? Even without
templates this can be true, surely if you are experienced as you say then you
know this.
Templates don't concern me. I just think Qt classes are superior, from the Qt
docs: "The container classes are implicitly shared, they are reentrant, and
they are optimized for speed, low memory consumption, and minimal inline code
expansion, resulting in smaller executables."
The port is even a smaller code base. A crude estimate:
rpp> cat *.h *.cpp | wc
2870 8822 80245
rpp2> cat *.h *.cpp | wc
2751 7478 63391
I'm yet to run benchmarks but I will at some point.
Ironically, most of the work we're doing is so that we can support code
completion for templates :)
Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20060425/37caf3ea/attachment.sig>
More information about the KDevelop-devel
mailing list