|
|
|
|
|
by wannabe44
1 day ago
|
|
Map function leads to poor code in Go. Function literals are verbose and inlining is far less agressive. It simply isn't the way of the language. Even python shuns map and filter in favor of comprehensions. A for loop is more readable than the lambda soup. |
|
Let's assume you have a slice of strings you want to uppercase. Which of the following is more readable?
Let's say you want to parse a bunch of user-given inputs into durations, surely the following is more readable? I think map functions lead to cleaner code when used like the above, and a lot of for loops end up falling into those patterns.