标签:clean
细节汇总:
类名 对象名使用名词,方法名使用动词(其参数为名词)
the
function and argument should form a very nice verb/noun pair.
For example,
write(name) is very evocative. Whatever this “name” thing is, it is being “written.”
重载构造器时,使用静态工厂方法(相应构造器考虑用private),并按实际含义命名
(When constructors are overloaded, use static factory methods with names that
describe the arguments. For example,
Complex fulcrumPoint = Complex.FromRealNumber(23.0))
is generally better than
Complex fulcrumPoint = new Complex(23.0);
Consider enforcing their use by making the corresponding constructors private.
标签:clean
原文地址:http://blog.csdn.net/lemon89/article/details/46387585