Browse Source

Clarify variable capitalization rules

Alois Mahdal 5 years ago
parent
commit
91a26c6938
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      notes/style.md

+ 7
- 7
notes/style.md View File

@@ -276,17 +276,17 @@ Common language constructs
276 276
 
277 277
 ### variables ###
278 278
 
279
-Common advice applies to variable naming, but capitalization is decided
280
-based on scope:
279
+There are three types of variables recognized in terms of this style.
280
+The distinction is based on scope:
281 281
 
282 282
  *  Global variables must be `ALL_CAPS`.
283 283
 
284
- *  Local variables must be `lowercase` or `snake_case`, and *must not*
285
-    be used in inherited scope, i.e. in a child function.
284
+ *  Function-local variables must be `lowercase` or `snake_case`.
285
+    These variables *must not* be used in inherited scope, i.e. in
286
+    a child function.
286 287
 
287
- *  Optionally an exception from the previous rule can be granted to
288
-    a specific variable.  However, such variable must be named using
289
-    `CamelCase`.
288
+ *  Inheritable-local variables must be `CamelCase`.  These variables
289
+    may be used in inherited scope, i.e. in a child function.
290 290
 
291 291
  *  Both kinds of local variables (inherited and non-inherited) should
292 292
     be defined in header of the function, that is, before actual code.