In general, good programming style says you put in comments that are going to be valuable in helping you as a reader understand what's going on inside of the code.
通常来说,优秀的编码风格意味着,你要放进去的注释,在帮助代码阅读者,理解代码内部,是怎么工作的。
It's words to you, or to the reader of the code, that are telling you what's going on inside of this code. OK?
注释是一些对你,或者对代码阅读者说的一些话,告诉你这段代码,是干什么的,对不对?
Meaning, why in the world do I have to tell the reader that I'm binding x to the value three? All right?
意思就是,我为什么要,告诉代码阅读者,要把x绑定到3这个值上呢?,对不对?
应用推荐