in reply to coding of algorithms is inherently procedural
Algorithms are pretty well language agnostic. Knuth makes this point in "Art Of Programming" by designing an imaginary computer (with a number of strange properties, like it could be binary or it could be decimal) and then presenting all of his examples in assembler code targeted for this imaginary computer/cpu enviornment. He says that this is important as programmers have a tendency to use constructs that are as brief as possible in the language they are using, and not necessarily as efficient as possible and that a CPU level understanding is necessary to truely understanding and analysing algorithm efficiency.
Its important to remember that FP, OO and Imperative programming are all just different tools, none of them really is any better than the others, just more suited to different types of problems, and with their own particular quirks. OO makes it really easy to write bizarre and inefficient solutions, FP has been known to drive folks mad, and Imperative code often is just horribly difficult to understand and maintain, but underneath they all break down to the same set of CPU instructions, and the CPU really doesnt care where those instructions came from.
|
|---|