Any of those comments would be better than none.

Sorry, but I disagree. The post contains a full explanation of the algorithm involved and additional comments in the associated snippets would be redundant. Even dangerous. And taking those snippets out of context of the post, does it a disservice.

What you are suggesting is that if a programmer cribs a reference work--say AoCP--that they should incorporate into their code, the same comments as the author of that reference, incorporated in theirs. Knuth's comments for his MMIX code probably won't make a great deal of sense, if applied to a Perl or Haskell implementation.

hard to tell whether you intended G and T to give you W or whether that would be an accident.

In the context of the post, the intent is clear. Taken out of context, pretty much anything can be misinterpreted. And trying to write comments that could never be misinterpreted regardless of what context you dropped them into is an exercise in futility if ever I heard one.

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^5: Lower-casing Substrings and Iterating Two Files together by BrowserUk
in thread Lower-casing Substrings and Iterating Two Files together by neversaint

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, 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, 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.