What is the meaning of #XXX in code comments?

前端 未结 10 759
轮回少年
轮回少年 2020-12-12 09:29

I have seen this a lot in code, even vim marks it as a special case. #TODO and #FIXME are two other fix markers vim highlights but what does

10条回答
  •  余生分开走
    2020-12-12 10:12

    XXX in a comment is usually a heads-up. It could be:

    • Something that's not implemented completely correctly.
    • Something that should be fixed later on.
    • Highlighting a possible problem spot.
    • Something you're not sure about, a question.

    I've often preferred a more descriptive tag like FIXME or TODO or HACK. XXX is often used as a catch all for the above.

    Searching for 'XXX' on the FreeBSD code cross reference is a good example of many of the uses. There are thousands...

提交回复
热议问题