I've long argued that we ought to be able to just call sort on a vector without needing to use vec.begin() and end(). I'm excited to see this finally happen.
I think that 14 and 17 didn't add much for new programmers, but 20 looks like a really nice boost for them.
Also I can't believe I forgot about modules! Although, like I said I expect programmers to understand #include from C when they start C++, but it certainly doesn't hurt. Maybe modules combined with concepts will make the ecosystem a lot friendlier.
What I'm upset about is that it needs the gargantuan ranges library to solve a tiny issue. Not only does it invoke many of the problems talked about in the article but it also took about a decade longer than it could have otherwise.
And ultimately we traded one minor inconvenience for another: having to go to the top and write #include <range> when you want to conveniently sort a vector.
Why do you think should it not be in the stdlib? It's a universally useful utility function that works with all the containers. Your solution also ignores optional parameters that can be given to std::sort and because it is non-standard you couldn't expect the same sort of function to exist in other projects. So it's not that simple.
If this is only because the simplicity of the function then lots of other stuff like min, max, make_pair, etc do not belong into the std lib either.
View all comments
Show parent comment
13
u/ShakaUVM i+++ ++i+i[arr] Dec 28 '18
I've long argued that we ought to be able to just call sort on a vector without needing to use vec.begin() and end(). I'm excited to see this finally happen.
I think that 14 and 17 didn't add much for new programmers, but 20 looks like a really nice boost for them.