Just, as I see a new built-in, I’m curious: is there any RFC that
described this addition to the language? Given that the RFC repo readme
explicitly mentions “Any semantic or syntactic change to the language
that is not a bug fix” and “Introduction of new interfaces or functions”
as requiring an RFC, I think a new built-in would fit the bill.
My thinking is that just dumping functions from lib into builtins to
make them faster may be a good short-term solution to slowness, but may
be a long-term hindrance by forcing nix to keep backwards-compatibility
with that forever.
So I don’t want to debate this specific addition here, but do you know
of any RFC or framework RFC that would clarify which functions should be
made into built-ins and which ones should not? And if there is currently
none, would it be possible to have one before the next addition of a
built-in, in order to avoid built-in proliferation issues?
(cc @infinisil as you appear to have made the initial PR)
The RFC process is for “when one intends to make “substantial” changes to the Nix ecosystem”, which in my opinion doesn’t apply to adding utility functions like groupBy (and I don’t think we’ve ever had an RFC about adding a builtin function). Having said that, it would be good to have some written rule about when it is appropriate to add builtin functions.
The trash directory existed to reduce the time window during which the garbage collector had to hold the global GC lock (since moving a big store path to trash is quick, while deleting it may be slow). Now that the collector is non-blocking, this is no longer necessary.