|
|
|
|
|
by stouset
1254 days ago
|
|
Every abstraction is unnecessary. And the gains are almost always minor… until you apply some of those abstractions across an entire code base. C-style `for` loops were the norm for decades. Now virtually every language gives you some ability to iterate directly over every element in a collection. Replacing a `for` loop with an iterator over each element is never necessary. The old way worked for decades. The gains are minor. Should we go back to C-style `for` loops? If not, why not? When you understand the answer to that, you’ll understand why that same logic applies to trivial functions like `zip` and `map` that simply take the idea one minor step further. |
|