Recently, my friend Gav wrote about using STL to filter a vector of
values in C++ in which he explained a surprising gotcha. I’m sure
he knows what he’s talking about, but it struck me how ugly this
(presumably idomatic) code was. So I figured I’d see what it would
look like in a few more “modern” languages:

Yeah, I get that this wasn’t the point of the original post–sometimes
you’re just stuck with C++. But if you do have the choice, other
languages can be far more expressive for this common kind of list
processing.

If you have examples in other languages (or improvements to my
efforts) send them in and I’ll post them here.