Re:Anecdotally, Programmers Dislike "Reduce"
by vhcr on Wednesday September 16, 2026 @11:14PM
(#49735993)
The problem with:
is that it re-allocates O(n) times, even if ret is referenced only once.
[ Parent
| on HN ]
Re:Anecdotally, Programmers Dislike "Reduce"
by edflsafoiewq on Wednesday September 16, 2026 @11:46PM
(#49736152)
If the s are small the usual geometric buffer growth mitigates that. Of course you can compute the final buffer size in this case, but often you have a bunch of dynamically-generated strings of different sizes.