3 ms·
Large anonymous functions are very much a thing in JavaScript.
by jnwatson 7y ago
Large anonymous functions are very much a thing in JavaScript.
- whalesalad 7y agoThis trend will gradually fade into the history books. Just because it’s a thing doesn’t mean it’s a good one.
- doteka 7y agoLarge 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.