Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“避免使用 /*...*/ 这样的多行注释。有多行注释内容时,使用多个单行注释。” #25

Open
lyhper opened this issue Jan 28, 2016 · 1 comment

Comments

@lyhper
Copy link

lyhper commented Jan 28, 2016

请问这是为什么呢?

@at15
Copy link

at15 commented Jan 28, 2016

我只是路过来凑个热闹的... 下面的都是我猜的....

因为可以避免多行里面有其他可能截断注释的内容,取消中间某几行注释也方便一些,还有就是 ide 支持好,比如 phpstorm 和 webstorm 可以选中一大段 ctrl+/ 来个每行加上或者取消行注释

//var a = 123;
//var b = 321;
//if( a === b){
//    console.log('oops');
//}

不过通过注释生成文档的时候似乎都用 /* */ ,除了 golang 用 //

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants