本文介绍了首选编码风格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我很好奇你们中有多少人喜欢风格1和风格2,以及为什么。 有这些风格的名字吗? 风格1: 方法{ } 样式2: 方法 { } I am curious about how many of you prefer style 1 vs. style 2, and why. Arethere names for these style? style 1: method { }style 2: method{ }推荐答案 这就是我一直用的东西。它被称为Allman风格,我相信 它使事情比K& R更清晰。 见 http://www.science.uva.nl/~mes/jargo .. .dentstyle.html 了解更多 信息。另一方面,我认为在倒数第二段中它实际上是错误的,它声称大多数Java程序员使用 K& R - 我会说最多使用奥尔曼。 - Jon Skeet - < sk *** @ pobox.com> http://www.pobox.com/~skeet/ 如果回复对于小组,请不要给我发邮件 This is what I always use. It''s called the Allman style, and I believeit makes things much clearer than K&R. See http://www.science.uva.nl/~mes/jargo...dentstyle.html for moreinformation. On the other hand, I believe it''s actually wrong in thepenultimate paragraph, where it claims that most Java programmers useK&R - I would say most use Allman. --Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet/If replying to the group, please do not mail me too 这篇关于首选编码风格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-21 00:47