[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)

Smith Martin Martin.Smith at theqtcompany.com
Tue Feb 10 12:37:28 CET 2015


>For those guys, no amount of documentation will save them from writing 
>bad code, so I don't think we should concern ourselves much with this case.

>I'm happy with the documentation if an educated developer reads it, and 
>is able to make the correct decision on which container class to use.

You're sort of nullifying the concept of recommending best practices at all.

We won't be asking the developers to include basic CS concepts when documenting a new class, if that's a worry. In this case, I asked for clarification of some points, so I could add a recommendation to QMap myself.

I use QMap all the time, and almost certainly in situations where a vector would be better. Why? Because it's dead simple and I need to get it running now. I suppose we get used to doing the same thing the same way and don't always pay attention to these details when a deadline is fast approaching. It helps to be reminded of best practice tips from time to time when checking a class I use out of habit.

martin
________________________________________
From: development-bounces+martin.smith=theqtcompany.com at qt-project.org <development-bounces+martin.smith=theqtcompany.com at qt-project.org> on behalf of Smith Martin <Martin.Smith at theqtcompany.com>
Sent: Tuesday, February 10, 2015 12:20 PM
To: Marc Mutz
Cc: development at qt-project.org
Subject: Re: [Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)

>I'm not saying that the docs should not contain some information. I'm saying
>that this is not about our users, it's about us, the developers.

I'm just adding that for some of the points you raised, if they have to be raised for us, the developers, it's a good bet they our users will benefit from them as well.

martin
________________________________________
From: marc at kdab.com <marc at kdab.com> on behalf of Marc Mutz <marc.mutz at kdab.com>
Sent: Tuesday, February 10, 2015 11:35 AM
To: Smith Martin
Cc: Ziller Eike; development at qt-project.org
Subject: Re: [Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)

On Tuesday 10 February 2015 11:01:50 Smith Martin wrote:
> >So, no, I don't think we should discuss everthing ever written about C++
> >efficiency in the Qt docs. But we need to point it out to each other in
> >code  reviews and become better at not writing sloppy code.
>
> The suggestion was not to discuss everything about C++ efficiency but to
> discuss the traps for young players using a QMap when a sorted QVector
> would be better.

I'm not saying that the docs should not contain some information. I'm saying
that this is not about our users, it's about us, the developers.

> >IOW: We need to start thinking about our algorithms and data structures
> >again[1], but this time in the new world of caches and multithreading
> >where  the only fast data structure is an array.[2]
>
> But if this is a new world, then the CS course and reference books you
> suggested might not say much about it yet.

http://www.akkadia.org/drepper/cpumemory.pdf Note the publication date.

> I'll bet most of our customers are not the C++ equivalents of Bruce Lee you
> imagine them to be. Some of them might be coming to C++ via trying to
> create something in QML.

Again, I'm not talking to or about our users, I'm talking to and about us, the
developers.

--
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list