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.

---
$world=~s/war/peace/g


In reply to Re: coding of algorithms is inherently procedural by demerphq
in thread coding of algorithms is inherently procedural by spurperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.