Re:"On iteration": Why people leave Python
by silentbicycle on Friday February 05, 2010 @07:44AM
(#1103396)
"Functional programming is like describing your problem to a mathematician. Imperative programming is like giving instructions to an idiot." -- arcus, #scheme on Freenode
(from the Scheme quotes file at http://community.schemewiki.org/?scheme-fortune-cookies)
I disagree. Functional programming is about as far away from the machine as you get. When I write functional code, I feel like I am describing the problem I want to solve in great detail, just as I would if I were writing about it. (And despite being "far away from the machine", the code still runs quickly. There is something to be said for describing a solution to your problem instead of telling the CPU which bits of main memory to flip.)
As you go down the spectrum from FP to OOP, your code becomes more code-like. Create object. Call method. Save return value. Pass value to another object. Get result. This is still pretty abstract, though, and a fine way to code.
Then you get to procedural programming (C), and then your code truly is code. Allocate memory. Move bits from register to memory. Set interrupt. It's hard to even see an algorithm in there, there's just so much code.
In functional programming, things are often so abstract that you define functions in terms of other functions without even mentioning the data you are processing. Let's face it; that's not "code".