How do you flag code so that you can come back later and work on it?

前端 未结 23 2331
后悔当初
后悔当初 2020-12-24 11:46

In C# I use the #warning and #error directives,

#warning This is dirty code...
#error Fix this before everything explodes!
<         


        
23条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 12:04

    If it's some long term technical debt, you can comment like:

    // TODO: This code loan causes an annual interest rate of 7.5% developer/hour. Upfront fee as stated by the current implementation. This contract is subject of prior authorization from the DCB (Developer's Code Bank), and tariff may change without warning.

    ... err. I guess a TODO will do it, as long as you don't simply ignore them.

提交回复
热议问题