Am I the only one who finds lambda functions inherently less readable? Take the interview question. Apparently the great programmer will jam all of his logic into one line and that's more elegant? What about more readable and thus more maintainable? At what point did that stop being important?
I guess I just find it interesting that I looked through this and found lambdas or anonymous functions not really useful for any projects I work on currently.
I've found if the language has powerful enough OOP, it usually doesn't need lambdas. I can't comment for the featured list because it's register-walled.
For example, Java GUI libraries often use a lambda to define widget events such as "on click". It should be attached to a button object as an OnClick(...) method; that's the most logical place for common event handling code. But either Java and/or the GUI framework made doing that too tricky (fault subject to debate), so lambda's are used as an ugly fudge.
1
u/avesliving Nov 19 '22
This is really interesting and a good overview.
Am I the only one who finds lambda functions inherently less readable? Take the interview question. Apparently the great programmer will jam all of his logic into one line and that's more elegant? What about more readable and thus more maintainable? At what point did that stop being important?
I guess I just find it interesting that I looked through this and found lambdas or anonymous functions not really useful for any projects I work on currently.