4 ms·
It seems like the author is applying some ideas from functional programming -- that is, don't keep objects and mutable state around like you're building an ugly
by eat_veggies 6y ago
It seems like the author is applying some ideas from functional programming -- that is, don't keep objects and mutable state around like you're building an ugly facsimile of reality, but rather think about programs as flows and compositions of pure functions.
Chapter 5, "Higher-Order Functions" in the EJS book used to be called "Functional Programming" in an older edition [0], and it does a great job of highlighting the main attraction of FP without explicitly naming it as such.
I've heard really nice things about the Mostly Adequate Guide to Functional Programming [1], and the Structure and Interpretation of Computer Programs is a classic [2] for teaching you how to think in this new way.
[0] https://eloquentjavascript.net/1st_edition/chapter6.html https://eloquentjavascript.net/1st_edition/chapter6.html
[1] https://mostly-adequate.gitbooks.io/mostly-adequate-guide/ https://mostly-adequate.gitbooks.io/mostly-adequate-guide/
[2] https://mitpress.mit.edu/sites/default/files/sicp/index.html https://mitpress.mit.edu/sites/default/files/sicp/index.html
- LaundroMat 6y agoThank you, I'm very much looking forward to reading these.