Changes for page Expressive Names

Last modified by chrisby on 2023/11/18 17:45

From version 1.8
edited by chrisby
on 2023/11/18 16:19
Change comment: There is no comment for this version
To version 1.9
edited by chrisby
on 2023/11/18 16:19
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -9,9 +9,7 @@
9 9  * **Avoid mental mappings.** The name of a variable should not require mental effort to understand. For example, unusual abbreviations should be avoided.
10 10  * **Names of classes consist of nouns** or substantivistic expressions.
11 11  * **Method names** **consist of a verb** or an expression with a verb. Accessors, mutators, and predicates should be named after their value and follow the JavaBean standard (prefixes: get, set, is, has).
12 -*
13 -
14 -**Use object creation functions rather than overloaded constructors**, as the latter can cause confusion. Overloaded constructors should be declared private, and functions should be used to create instances whose names make the difference clear.
12 +* **Use object creation functions rather than overloaded constructors**, as the latter can cause confusion. Overloaded constructors should be declared private, and functions should be used to create instances whose names make the difference clear.
15 15  * **No puns or humorous names.**
16 16  * **Choose one word for each concept.** For example, if you use the word "fetch" once for a particular concept, you should consistently use "fetch" instead of synonyms such as "retrieve".
17 17  * **Avoid ambiguities** as in the word "add" (addition or adding).