Changes between Version 11 and Version 12 of Commentary/CodingStyle


Ignore:
Timestamp:
May 30, 2007 8:36:18 PM (7 years ago)
Author:
simonmar
Comment:

move "general style" to the top

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/CodingStyle

    v11 v12  
    66 
    77The general rule is to stick to the same coding style as is already used in the file you're editing. If you must make stylistic changes, commit them separately from functional changes, so that someone looking back through the change logs can easily distinguish them.  
     8 
     9== General Style == 
     10 
     11It's much better to write code that is transparent, than to write code that is short. 
     12 
     13Often it's better to write out the code longhand than to reuse a generic abstraction (not always, of course).  Sometimes it's better to duplicate some similar code than to try to construct an elaborate generalisation with only two instances.  Remember: other people have to be able to quickly understand what you've done, and overuse of abstractions just serves to obscure the ''really'' tricky stuff, and there's no shortage of that in GHC. 
     14 
    815 
    916== To literate or not to literate? == 
     
    128135 
    129136 
    130 === General Style === 
    131137 
    132 It's much better to write code that is transparent, than to write code that is short. 
    133  
    134 Often it's better to write out the code longhand than to reuse a generic abstraction (not always, of course).  Sometimes it's better to duplicate some similar code than to try to construct an elaborate generalisation with only two instances.  Remember: other people have to be able to quickly understand what you've done, and overuse of abstractions just serves to obscure the ''really'' tricky stuff, and there's no shortage of that in GHC. 
    135