|
|
|
|
|
by brudgers
3410 days ago
|
|
I tend to think of functional Programming as an idiom. Sure some languages make it harder and some make location based programming nearly impossible...except that once you're on the web making remote calls to REST API's even the most functional friendly languages can't do better than a saying the value is the warning-warning-could-be-anything-type...which means that from a functional perspective a function that calls a REST API always returns the same value regardless of input parameters or it's not a function. And that's ok by me. Because the idiom of functional programming is a gestalt of figure and ground. The ground is knowing when to explicitly use place based methods -- Under the hood, so long as we have computers based on the Von Neumann architecture everything we do ultimately gets distilled into place based computing that mutates values. Functional programming is just a way of abstracting over that when it is productive to do so. Functional programming, like object oriented programming, is a set of clever abstractions not magic. There aren't functional programming computers (or object oriented computers) that are different from imperative mutating machines. Anyway, I guess the point is that functional programming shares quite a bit with test driven development. It's more a matter of programmer behavior than language. And thus my advice is to start writing functional code in whatever language is at hand: functional programmers who use PHP write functional code in PHP. Of course it's always fun to play with a new language which is orthogonal. Good luck. |
|