I don't like this… Is this cheating the language?

前端 未结 15 2636
一向
一向 2021-02-13 15:52

I have seen something like the following a couple times... and I hate it. Is this basically \'cheating\' the language? Or.. would you consider this to be \'ok\' because the IsNu

15条回答
  •  暖寄归人
    2021-02-13 16:38

    Writing code cost a lot of $ to a company. But maintaining it cost more !

    So, I'm OK with your point : chance are that this line of code will not be understood immediatly by the guy who will have to read it and correct it in 2 years.

    Of course, he will be asked to correct a critical production bug. He will search here and there and may not notice this.

    We should always code for the next guy and he may be less clever that we are. To me, this is the only thing to remember.

    And this implies that we use evident language features and avoid the others.

    All the best, Sylvain.

提交回复
热议问题