Changes between Version 21 and Version 22 of Development/CodeConventions

Show
Ignore:
Timestamp:
03/22/10 03:32:41 (4 years ago)
Author:
benl (IP: 129.94.242.47)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Development/CodeConventions

    v21 v22  
    3434 * If a function does several things in a regular way, then it should look like that in the source code. This means you should line up arguments to similar function calls. For example, use this: 
    3535{{{ 
    36  = do   someFunction      "Monday"    (23, 23)         (Just 'a') 
    37         someOtherFunction "Tuesday"   ("this", "that") Nothing 
    38         anotherFunction   "Wednesday" ('a', 'b')  
     36 = do  someFunction      "Monday"    (23, 23)         (Just 'a') 
     37       someOtherFunction "Tuesday"   ("this", "that") Nothing 
     38       anotherFunction   "Wednesday" ('a', 'b')  
    3939}}} 
    4040 
    4141 instead of this: 
    4242    {{{ 
    43  = do   someFunction "Monday" (23, 23) (Just 'a') 
    44         someOtherFunction "Tuesday" ("this", "that") Nothing 
    45         anotherFunction "Wednesday" ('a', 'b')  
     43 = do  someFunction "Monday" (23, 23) (Just 'a') 
     44       someOtherFunction "Tuesday" ("this", "that") Nothing 
     45       anotherFunction "Wednesday" ('a', 'b')  
    4646   }}} 
    4747 
     48 * For the same reason, line up the '=' signs in groups of bindings. For example, use this: 
     49{{{ 
     50  let  thing          = some stuff 
     51       someOtherThing = some more stuff 
     52       oneLastThing   = still more stuff 
     53  in   ... 
     54}}} 
     55 
     56 instead of this: 
     57{{{ 
     58  let  thing = some stuff 
     59       someOtherThing = some more stuff 
     60       oneLastThing = still more stuff 
     61  in   ... 
     62}}} 
    4863 
    4964