Where does the XXX comment prefix in Eclipse come from?

前端 未结 7 1995
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:48

    I've worked with a team where XXX was used to point out a "bug or task that was not yet entered in Trac.". After it was entered in Trac the comment would be changed to TODO with the ID appended.

    To Eclipse though, it's just a marker like TODO and FIXME. I imagine that it's originally used as a strong form of TODO. You usually see comments like this:

    // TODO: Need to optimize this once n becomes greater than 1000.
    

    But sometimes you'll have a comment like:

    // TODO: Fix SQL injection bug before production release!
    

    Unfortunately a quick grep wont make that SQL injection bug stand out among the 1000s of other TODOs. Using XXX here would help mark things that must be done before a milestone/release etc.

提交回复
热议问题