[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)
Konstantin Tokarev
annulen at yandex.ru
Tue Feb 10 12:45:10 CET 2015
10.02.2015, 14:37, "Smith Martin" <Martin.Smith at theqtcompany.com>:
>> 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.
FWIW, boost has flat_map container which provides sorted array with map's interface.
--
Regards,
Konstantin
More information about the Development
mailing list