3 ms·
The lambda approach avoids "I can't think of what I should call this, I'll call it `foo` for now" problem... Which isn't a problem we should be avoiding. Namin
by davvolun 7y ago
The lambda approach avoids "I can't think of what I should call this, I'll call it `foo` for now" problem...
Which isn't a problem we should be avoiding. Naming things in a way that other coders will understand is an important skill, and can be difficult.
- mike_hock 7y agoHow does it avoid that problem? The lambda doesn't help me understand what that part actually does any more than calling the function "foo_helper" or "foo_partN" or something like that would do.
- davvolun 7y ago> Which isn't a problem we should be avoiding I believe we're actually arguing the same thing. Anonymous functions aren't the end of the world, but self-documenting code is better. In the JS/JQuery world, breaking away from anonymous functions would represent such a fundamental shift in practice, I'm not going to do it on my own, but in Angular, I stay away from anonymous functions.