[Development] RFC: Containers member functions for algorithm
chgans at gna.org
Sat Mar 25 00:24:57 CET 2017
On 25 March 2017 at 07:00, Kevin Kofler <kevin.kofler at chello.at> wrote:
> Michael Winkelmann wrote:
>> The reason why STL is using free function is because it separates data
>> structures (aka containers) and algorithms.
>> A bad example what happens if you dont separate can be seen here:
>> ...and your data structure will be bloated with member functions.
> Why is that bad? It is convenient and object-oriented. Moving everything to
> freestanding functions goes against the principles of OOP.
"OO was hip in the 80s and 90s, but its time we moved beyond!".
item 3, last paragraph.
I'm not advocating for free functions, i really hate them. I have been
working with boost graph recently and find this technique awful to
write, awful to read and counter intuitive. I hope Qt won't become
> That said, even freestanding functions would be better than the current
> boilerplate myContainer.begin(), myContainer.end() copypasta.
> Kevin Kofler
> Development mailing list
> Development at qt-project.org
More information about the Development