in reply to Re: Spoiled by Perl
in thread Spoiled by Perl
coincidentally I procrastinated this Sunday implementing syntactic sugar for exactly this in Perl5.
There are some edge-cases tho, which keep we wondering ...
- how do you decide its a cmp or <=> ?
- what if you want to apply another ordering? Like Czech sorting?
- how do you sort by multiple criteria? Method chaining?
> This will even use a schwartzian transform if the optimizer decides it is worth it.
an optimizer detecting a good case for a Guttman-Rosler Transform transform would be more impressive tho. ;-)
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|Replies are listed 'Best First'.|
Re^3: Spoiled by Perl (sorting sugar)
by holli (Abbot) on Oct 31, 2021 at 22:29 UTC
by LanX (Sage) on Oct 31, 2021 at 22:38 UTC
by raiph (Deacon) on Dec 22, 2021 at 01:36 UTC
In Section Meditations