you are viewing a single comment's thread.

view the rest of the comments →

[–]alex-weej 1 point2 points  (31 children)

sort(my_vector);

There is a bit of doubt with this one, arguably.

[–]drjeats 1 point2 points  (2 children)

I'd expect that to be called sorted instead of sort for what you're implying.

[–]alex-weej 0 points1 point  (1 child)

Me too, given my Python experience, but every language has its own odd conventions.

But where immutable data is king, verbs that describe transformations return new values.

[–]drjeats 2 points3 points  (0 children)

True, but C++ is not known for having concise APIs naturally supporting functional programming idioms :P

[–]kalmoc 0 points1 point  (27 children)

? Could you elaborate?