http://qs1969.pair.com?node_id=506348


in reply to Re^2: Old sorting paper holds the key to unlocking the secrets of the Schwartzian Transform
in thread Old sorting paper holds the key to unlocking the secrets of the Schwartzian Transform

Last I checked, Perl6 was also supposed to support decoupling the key comparison from the extraction of keys from list elements. In Perl5, key extraction is conflated with comparison in a single sub, which means the key extraction code for $a is often copypasted for $b. Given that key extraction is decoupled from comparison, you’d also often need simple forms of comparison only, so there were ideas being bandied about for a more declarative comparison syntax for those forms.

Now the motivation for all this was to reduce duplication and make the trivial cases simpler, but such syntax would neatly allow the runtime to do ST sorting internally, without the programmer having to do anything explicit about it.

I don’t know what came of it, but I’d be surprised if it hasn’t made it into the current form of Perl6 in some shape. I should go look into this.

Makeshifts last the longest.