News for hackers. Stuff that matters.
Re:Coding style and undoing indentation hell by VMG on Friday June 01, 2012 @02:15PM (#4054786)
Another example

    r = 0;
    outer: {                                                                     
    foreach (x in a) {                                                           
      foreach (y in b) {                                                         
        if (condition(a, b)) {                                                   
          r = 1;                                                                 
          break outer;                                                           
        }                                                                        
      }                                                                          
    }                                                                            
                                                                                 
    return r;                                                                    
                                                                                 
instead of

    foreach (x in a) {                                                           
      foreach (y in b) {                                                         
        if (condition(a, b)) {                                                   
          return 1;                                                              
        }                                                                        
      }                                                                          
    }                                                                            
                                                                                 
    return 0;

There are no comments on this comment yet.