3 ms·
Large anonymous functions are a thing in every modern language I can think of except python. It’s the only sensible solution in the case of functional method ch
by doteka 7y ago
Large anonymous functions are a thing in every modern language I can think of except python. It’s the only sensible solution in the case of functional method chaining, which is much more readable than nested comprehensions. Python just got this one wrong.
- joshuamorton 7y agoLarge anonymous functions are rarely used in rust, go, python, java (streams instead), or cpp. Streams and repeated application of short anonymous functions are a much better solution to the method chaining issue. If js supported better streaming tools, they'd be less common in js too.