curiously, (the pure-perl version of) List::MoreUtils::uniq uses
map { $h{$_}++ == 0 ? $_ : () } @_;
rather than
grep { !$h{$_}++ } @_;
i wonder, a simple preference or are there interesting micro-optimizations in the map verison?
| [reply] [d/l] [select] |
I have no idea. If I were to guess, I would say that it probably has to do with a bug report that was received for 5.6.0 on some random OS we've never heard of. Lack of comments make this unclear.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
| [reply] |