代码风格与注释和XML的比较。
那么,应当采用代码风格,还是用注释或XML声明方面呢?
So, should you go with the code style, or declare aspects using annotations or XML? Here's a summary of the trade-offs of AspectJ's Java code-based approach.
我们保持代码可维护性的方法之一是保持代码风格的一致性。
One way in which we keep the code base manageable is by enforcing consistency.
这种代码风格的使用从视觉上给出了一种强烈的指示:该类是一个不可变类。
Using this style of code is a strong visual indicator that it's an immutable class.
看看SWT的读取和分发事件代码,它会让你想起MFC的代码风格。
Look at the code that SWT read and dispatching events, it reminds you MFC code style.
显然,从图2 - 5的方面声明来看,代码风格是处理AOP声明最简洁的技术。
It's clear from the aspect declarations in figures 2-5 that the code style is the most concise approach to working with AOP declarations.
这么做会使得项目之间相互收益,就像同一种代码风格会对一个项目本身有好处一样。
Doing this offers the same benefits across projects as does having a code style within one project.
找到一种代码风格不被编译器或解释器重视的微小部分应该至始至终的保持一致。
Have a code style. All the little things that the compiler or interpreter doesn't care about should be done the same way throughout a project.
对 OOAD项目评分的一部分——每周给一次分——就是以他们的注解和代码风格为基础的。
Part of my OOAD project grades -- given weekly -- were based upon their javadoc comments and their code style.
使用匿名方法时,代码风格应该和普通方法一样,与委托声明对齐。(大括号应该放到新的一行里)。
With anonymous methods, mimic the code layout of a regular method, aligned with the delegate declaration. (complies with placing an open curly brace in a new line).
我想学术研究组织会从代码审核上受益良多,当然随之而来的:良好的代码实践,一致的代码风格,坚持单元测试。
I think academic research groups would gain a lot by using code reviews, and of course the things that go with them: good coding practices, a consistent style guide, insistence on unit tests.
借助于SourceMate v1.1,用户可以定制生成的方法签名的代码风格(比如说,将左花括号放在同一行或是下一行等)。
With 1.1, users can customize the code style of the generated method signatures (for example, put the open bracket on the same line or next line).
我们都非常倾向于实用主义,并且希望在书中、我们用于描述模式的方法以及我们创建的模式中都体现出了这一点。不管我们讨论的是关于代码风格(应该在哪里放置?)
We both tend to be quite pragmatic and we hope that this is reflected in the book and the approach we have taken in describing patterns in general and the patterns that we have authored.
然后,您将了解如何更正这些问题,以一种低调的方式编写相同的代码,并了解这种开发风格的一些最佳实践的原则。
You will then learn how to correct these issues, writing the same code in an unobtrusive way, with guidelines on some best practices for this style of development.
由于这两个问题都依赖于数字因子,它们都是重构(不是双关语)和说明代码重用风格的最佳候选者。
Because both of these problems rely on a number's factors, they are good candidates for refactoring (no pun intended) and thus for illustrating styles of code reuse.
它确实能够产生风格优雅、整齐美观的代码。
例如,如果一种语法中允许嵌套标记代码,或许可以使用这种递归风格。
For example, if the grammar were to allow nested markup codes, this recursive style would probably be used.
代码审核还会帮助程序员相互传授有用的技术,方法,风格等。
Code reviews also help programmers educate each other about useful techniques, methods, styles, etc.
尽管植入每种容器的代码可能相似,但容器本身反映了不同的能力、风格和整体哲学。
While the code that goes into each container may be similar, the containers themselves reflect different capabilities, styles, and overall philosophies.
包括了JSP代码片断和相应的CSS风格(可用的)。
Included are snippets of the JSP code and the corresponding CSS styles (where applicable).
表1中的代码片段演示了内联方法风格的简单性和易用性。
Table 1 provides a snippet of code to demonstrate the simplicity and usability of inline methods.
要说明代码重用及其含义,我要回过来谈谈先前文章说明代码结构和风格所用的数字分类器。
To illustrate code reuse and its implications, I return to a version of the number classifier that previous installments use to illustrate code structure and style.
他们直接使用HTML,并在代码中寻求博客风格的模式。
Instead, they go directly to the HTML and look for blog-style patterns in the code.
另一个问题就是所有代码必须遵循这种风格,因此如果在应用程序中集成了不遵循这种命名约定的第三方代码后,问题就复杂了。
Another issue is that all code must conform to this style, which can be difficult if you're integrating third-party code within an application that doesn't conform to this naming convention.
它有很好的语法高亮(支持多种语言)、好几种代码折叠的风格、支持块缩进/取消缩进。
It has good syntax highlighting (in lots of languages), several styles of code folding, and block indent/dedent.
它有很好的语法高亮(支持多种语言)、好几种代码折叠的风格、支持块缩进/取消缩进。
It has good syntax highlighting (in lots of languages), several styles of code folding, and block indent/dedent.
应用推荐