3 ms·
For languages that support it, use lambda functions judiciously - too much of them make code really error-prone and hard to debug. (Not the most wide-spread pro
by mraybman 16y ago
For languages that support it, use lambda functions judiciously - too much of them make code really error-prone and hard to debug. (Not the most wide-spread problem, but came across this today)
Also check for null!!! ;)
- dpritchett 16y agoYour experience is the exact opposite of what I was promised by the functional programming community. Can you please elaborate on how lambdas are giving you trouble?
- mraybman 16y agoDon't get me wrong, lambdas are really useful and elegant, I just think they should be used when there is a purpose other than simply making the code succinct - such as limiting scope. I've seen people use them instead purely to reduce the number of lines of code, which I think in the end makes it less readable and harder to debug.