Reply to post: Re: Not about comments but...

How to spot a coders comment

Nick Kew

Re: Not about comments but...

I've used that kind of thing, and seen the errors appear for real an enhancement or two later.

It anticipates the possibility of future code change, as in a class you intend always to be overridden, but implement stubs for. Or even simpler, this sorta thing:

enum { foo, bar } x;

...

switch (x) {

case foo: do_something; break;

case bar: something_else; break;

default: fputs("BUG: unhandled enum value in ...", stderr);

}

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon