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.
| [reply] |