Because most of the time your hack only works by accident, or doesn't handle expected corner cases, or leaves out important use cases, or is a ticking time bomb.
Because most of the time your hack only works by accident, or doesn't handle expected corner cases, or leaves out important use cases, or is a ticking time bomb.
You're confusing a symptom with the root cause.
TODO items are symptoms of a problem, one which can and does often manifest in code that is brittle and only works by coincidence.
> A TODO should document something that has been considered and would potentially be an improvement, but is not currently necessary.
Not really. A TODO is just a comment someone decided to add because at the moment they spotted something that might require some work, but couldn't be bothered to track it as a work item. Just that, nothing more.
> It isn’t supposed to be a flag that says “warning: I’m checking in broken code.” I
Except it actually is supposed to be a flag that states "yeah I know this is broken code but trust me I'll get around to really fix it at some time between not now and never"
I've lost count of the age-old TODO items I stumble upon on projects I've worked on that served no purpose other than either stating "I think this needs fixing but I can't be bothered to track work items in a ticket" or "I just need my PR to go through, trust me bro I'll do this right once I remember to fix my shit"
I’m now legitimately frightened about what some people are apparently labeling TODO. If that’s the way you use it, no wonder you’ve come to the conclusion it’s terrible.
// TODO
// FIXME
I think it's nice to have the distinction, with the former being a general suggestion, whereas the latter is perhaps more urgent.Not that people's opinions won't differ greatly anyways. Some might set up their static code analysis to complain about every single TODO item and actively manage them with their issue tracking system, others just won't care.
That's a Talking Heads lyric and not a point of fact.