Changes between Version 19 and Version 20 of Development/CodeConventions
- Timestamp:
- 03/16/10 07:54:10 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Development/CodeConventions
v19 v20 49 49 50 50 === Naming === 51 52 * Most names should use camel case style, but it's ok to use underscores in a postfix when naming different "versions" of a value. For example: 53 54 {{{ 55 let pastaSalad = initialSalad 56 pastaSalad_spiced = addSpice pastaSalad "Oregano" 57 pastaSalad_baked = bakeThing 100 pastaSalad_spiced 58 ... 59 in ... pastaSalad_baked ... 60 }}} 61 Avoid using names like `pastaSalad'` and `pastaSalad''`, because the prime doesn't provide any additional documentation. 62 51 63 * Name conversion functions like ` globOfTops :: [Top] -> Glob ` instead of ` topsToGlob :: [Top] -> Glob`. The type may be the opposite way around compared to the name, but it makes the source code easier to read. Consider ` (globOfTops someTops) ` vs ` (topsToGlob someTops)`. 52 64
