Remix.run Logo
ynzoqn 7 days ago

Inspired by your behavior, I looked up the Wikipedia article on Schwartzian transform[1]. The article mentioned that Rust not only provides sort_by_key, but also sort_by_cached_key. :D

[1]: https://en.wikipedia.org/wiki/Schwartzian_transform

jiggawatts 7 days ago | parent [-]

I keep saying to colleagues that simply knowing that something exists in a library somewhere is 90% of the skill of modern programming.

I suspect the profession of software archeology form the Vernor Vinge science fiction novels will soon become a reality, especially now that old languages can be uplifted mechanically with AI.

Sharlin 7 days ago | parent [-]

This one is particularly easy to chance upon, though, by either browsing the docs of slices’ `sort*` methods (because they’re all clumped together on the page), or even simpler, noticing it when you type `foo.sort` and your editor suggests autocompletions.