Changes between Version 19 and Version 20 of Development/CodeConventions

Show
Ignore:
Timestamp:
03/16/10 07:54:10 (5 years ago)
Author:
benl (IP: 129.94.242.47)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Development/CodeConventions

    v19 v20  
    4949 
    5050=== 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 
    5163 * 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)`.  
    5264