I am using rust, but this applies to many other languages, I get warnings like, dead code, unused variables, and etc, and while I remove most of them, there are some im not sure of, I like running my program and there being 0 warnings, or 0 warnings as i scroll down my code, so for things im unsure of, i mark them so the compiler doesn’t put warnings there. I also add comments, starting with TODO:, it has some information about what to think about when i revisit it, also the todo’s gets highlighed in my IDE with my extension, but is this bad practice?

  • HaraldvonBlauzahn@feddit.org
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    Fix the warnings first. By all experience, later is never.

    First specs, then a (perhaps semi-formal) API description, then implementation, then first tests, then fix warnings, then rigorous tests, then fix all bugs before adding more features. It sounds contra-intuitive, but you go faster this way.