Wednesday, May 07, 2008

Hierarchical comments in programming

Comments organize code, often hierarchically. This is the second major use of comments, the other being to annotate a specific section of code. We need the comment equivalent of the HTML div element to mark the scope of a "long" comment that extends a long way. Continuing the analogy with HTML, a short comment is like an attribute on an element, a long comment is like a DIV.

Consider DAG tagging.

No comments :