Open myaaaaaaaaa opened 2 weeks ago
I like it. What do other ppl say? from the original issue there was also talk about generator variants of min
/max
, add those too?
from the original issue there was also talk about generator variants of
min
/max
, add those too?
Done
Adding a stream-oriented add
is long-overdue, so my hope is that its introduction will not be delayed by potentially contentious issues.
Adding stream-oriented versions of min, max, min_by, and max_by would be fine, but it seems to me that existing implementations in C should be retained, both for the sake of efficiency and perhaps to facilitate future C-oriented development.
Maybe the best would be to have one narrowly focused PR for add
; and one or more separate ones for the rest.
It looks like min/1
and max/1
have been attempted before, and met the same concerns regarding jq vs C performance:
Perhaps it would be prudent to discuss the best approach for min/1
and max/1
in #2595 first?
For now, I'll revert this PR to focus solely on add/1
Improves the ergonomics of
add
by avoiding the need for wrapper arrays. Assignments should be easier now too:Related to #2595