paolo.angelelli at qt.io
Thu May 16 20:31:13 CEST 2019
i think you and alex stephanov are wrong. if QMap API is convenient, but does not perform for the few elements use case, optimize QMap for that use case, and don't make people write thousands of unnecessary for loops. From: Mutz, Marc via Development Sent: Thursday, May 16, 20:21 Subject: Re: [Development] Views To: development at qt-project.org  Paraphrasing what Alex Stepanov teaches in his A9 courses: No C programmer would _ever_ get the idea to use a self-rebalancing red-black tree for something that holds a dozen elements. Because once you understand what is required to implement one, you'd shy away from the sheer complexity. Yet, in C++, just typing QMap makes the compiler do all that stuff for you. Don't use a map or a hash just because you can and the API is convenient. Use it when it makes sense, given what data is expected to be stored. And you will invariably end up with using vectors all over the place. According to Stepanov, developers wishing to use a map should seek a face-to-face meeting with their manager to explain why they need it :) _______________________________________________ Development mailing list Development at qt-project.org https://lists.qt-project.org/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development