Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming conventions again........
Message
 
À
28/08/1999 07:59:27
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00258085
Message ID:
00258798
Vues:
21
Walter,

>>I think the above is less readable than
>
>>IF NOT userHasNoDeletePermission()
>> * Stuff to delete
>>ENDIF
>>RETURN llresult
>
>>and that it can make debugging harder depending on the circumstances.
>
>Wel it depends... If there is a lot of coding between the IF and ENDIF you have to scroll your code to make sure there is nothing after the endif when reading and analyzing the code.

Scroll? Not necessarily. If a module is over 20 lines, it's an indication that perhaps it's not as functionally cohesive as it should be.

>Another drawback is that it requires another indent of tabs (or spaces) to format your code, which *can* have a negative impact on readability.

Have to disagree here. The whole purpose of indentation is to show logical subordination. Again, writing functionally cohesive modules often relieves the problem of multiple indents.

Oh, I forgot one more rule. It's number 11 (I think)

11. Don't comment the obvious.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform