note
Tanktalus
<p>Er... hmm.</p>
<p>uniq is self describing, check. That it documents this is a bonus, but it kind of falls out of the fact that grep is implicitly documented this way. As in, when order isn't going to come out the same way, it's documented that it won't, otherwise assume it will. And needing a module is [Yes, even you can use CPAN|not an issue].</p>
<p>grep, on the other hand, is not "unobvious". The behaviour won't change in future versions of perl. It can't change. The perl devs care way too much about backward compatibility, so it can't change. And the auxiliary variable is self-scoped. Again, not an issue.</p>
<p>So, to me, uniq barely eeks out a win simply on self-describing. Which is why I use it.</p>
<p>Though you missed one point: because List::MoreUtils also comes with XS-based implementations, it can also be faster than using grep. This might matter to you. It doesn't matter to me, so it doesn't make my list of pros, but if it matters to you, you can add that as a plus. Assuming that it was compiled - I've never seen it not compiled, but presumably there may be situations where it isn't.</p>
997453
997560