in reply to Re^2: sort +*, @array
in thread sort +*, @array
but it's a direct equivalent
By that logic, every sort could be called a ST. That just doesn't make sense. Use the term as it is defined and well known: decorate-sort-undecorate!
retains the ST's generality
I don't see how it does that at all. Unless it can do decorate-sort-undecorate, it falls very far short of the ST's generality.
And it's not just about the "decorate" step, which your "key extractor" closure is roughly equivalent of. Because the ST has an explicit sort block (normally, unless it's the GRT variant :-)), it allows to execute arbitrarily complex Perl code in the comparison. Where does one do that in this Perl 6 "equivalent"?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: sort +*, @array
by raiph (Deacon) on Dec 10, 2013 at 07:24 UTC | |
by Anonymous Monk on Dec 10, 2013 at 21:31 UTC |