Where does the XXX comment prefix in Eclipse come from?

前端 未结 7 1993
Happy的楠姐
Happy的楠姐 2021-02-04 03:12

I was just wandering why is the prefix XXX ?

As far as I know its used for notes/reminders (or at least this is what I use it for and that is what the peopl

相关标签:
7条回答
  • 2021-02-04 03:54

    XXX, along with FIXME and TODO, is known in Eclipse as a task tag, and is indexed by the IDE to let you find the spots marked with those tags easily. You can edit such tags in the Eclipse Preferences -> Java -> Compiler -> Task Tags.

    As to where it comes from: it probably emerged form the "tags" that programmers spontaneously wrote in their code to quickly mark a given line. While FIXME and TODO are explicit enough, the reason XXX was used could be a combination of these reasons:

    • The string "XXX" does not usually occur in regular source code and is easy to look for with tools such as grep or a simple text search in an editor;
    • Traditionally, "X marks the spot" which needs attention; triple X even more so;
    • The X key is very close to the Command/Alt/Windows keys and is easy to reach, being on the lower row of the keyboard.

    I can't think of anything else...

    0 讨论(0)
提交回复
热议问题