5 ms·
Functional programming is about programming with pure functions, not lambdas. Lambdas are obviously very convenient in functional languages, but I think having
by wtetzner 4y ago
Functional programming is about programming with pure functions, not lambdas. Lambdas are obviously very convenient in functional languages, but I think having access to high-quality immutable data structure implementations is more important for pushing a functional style of programming.
- somewhereoutth 4y agoThe convenience means that they actually get used, which in turn enables us to see what they are good for / not so good for, and what abstractions might be useful e.g. Promises.
- wtetzner 4y agoI don't disagree that the convenience is useful, I guess I'm just saying that it's not specific to functional programming.
- lolinder 4y agoJavaScript is most programers' first introduction to map, filter, and reduce. Easy lambdas made those higher-order functions a staple of a lot of JS code. Meanwhile, immutable.js[0] is at 10 million downloads per week and rising. I would add that it's not just the ease of use of lambdas, but the fact that in JavaScript functions really are first class citizens. Most of the other widely used languages have closures added in as a bit of a hack and only treat some functions as real values. [0] https://www.npmjs.com/package/immutable https://www.npmjs.com/package/immutable