<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_一个程序员的自省_分类_21-Best Practice</title><id>http://feed.cnblogs.com/blog/u/15645/category/281434/rss</id><updated>2012-05-29T01:15:21Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/anderslly/category/281434.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/15645/category/281434/rss"/><entry><id>http://www.cnblogs.com/anderslly/archive/2011/01/26/name-conventions.html</id><title type="text">关于命名中的数量和人称</title><summary type="text">我们都明白命名的重要性，如果对命名不断地关注，就需要考虑命名中的动词和名词，特别的情况是动词的人称和名词的数量。在.NET Framework的Guideline中，有专门一章讨论了命名规范，包括大小写、单词的选择等，却没有涉及到人称和数量，下面来讨论一下这两方面的内容。名词的数量首先来看数量。名词的单数和复数在语义上有着明显的不同，为了提高可读性，数量需要认真地考虑。比如：属性（Property）：System.Collections.Generic.Dictionary&lt;TKey, TValue&gt;中的Keys和Count是好的例子。字段与此类似；方法名中的名词：在JS中我们熟悉的getEl</summary><published>2011-01-25T16:16:00Z</published><updated>2011-01-25T16:16:00Z</updated><author><name>Anders Cui</name><uri>http://www.cnblogs.com/anderslly/</uri></author><link rel="alternate" href="http://www.cnblogs.com/anderslly/archive/2011/01/26/name-conventions.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/anderslly/archive/2011/01/26/name-conventions.html"/><content type="html"/></entry></feed>
