in reply to Re: Re: No Comment
in thread No Comment

I disagree - I comment heavily on what I was thinking at the time. It has little to do with the actual code, and more to do with intentions:
# we know this is coming from XXX because of sub xxx, so we don't need + an extra taint check here
etc. I can go back to code I wrote only a week ago that I've already forgotten (small buffer :) and have trouble going through it quickly unless I do this.

But then. maybe I'm just dopey :)

.02

cLive ;-)

Replies are listed 'Best First'.
Re: Re: No Comment
by autarch (Hermit) on Apr 24, 2003 at 14:05 UTC

    No, you don't disagree, at least not with me ;) I think your example is an excellent example of a useful comment, because it's about the why of the code, not the what.

Re^2: No Comment (assert)
by Aristotle (Chancellor) on Apr 26, 2003 at 03:42 UTC
    A good trail of thought, but will the comment still apply if sub xxx is changed 6 months down the road by someone else? I prefer to describe this kind of thing with assertions instead - "executable comments", as schwern calls them in the description bit for Carp::Assert. This has the added benefit of making sure that changes that disturb such dependencies and implied relations don't slip by.

    Makeshifts last the longest.