[Development] RFC: Containers member functions for algorithm
kevin.kofler at chello.at
Fri Mar 24 19:00:57 CET 2017
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.
That said, even freestanding functions would be better than the current
boilerplate myContainer.begin(), myContainer.end() copypasta.
More information about the Development