typo in lambda discussion
zolia opened this issue · 1 comments
zolia commented
func main() {
...
datastore.Do(compare(data))
...
}
should be:
func main() {
...
datastore.Do(concat(data))
...
}
I usually discourage the use of lambdas, but where are some situations when they really improve convenience for developers like time.AfterFunc(duration int, func())
or registering various handlers like: ch.Handle(conn.TopicInit, func(c conn.Context) error
or famous type HandlerFunc func(ResponseWriter, *Request)
Lambas impairs the readability and traceability of a code in many cases, especially if the codebase is complex. IDEs also usually having trouble handling them properly, thus it might be hard to trace where certain lambda function originates from.