Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming conventions for custom methods?
Message
De
18/11/2008 13:59:50
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
18/11/2008 11:31:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01362229
Message ID:
01362628
Vues:
31
>IMO, strong typing has nothing to do with compile speed. It has everything to do with catching errors at compile time that you normally wouldn't catch until runtime.
>
>If you don't want to declare every variable in .Net, then just make everything var (although it isn't recommended) or turn it off in VB.
>
>No need to scroll up either. Most .Net people just define the variable when it's first used.

IOW, they have already adjusted their hands to the handle of the new hammer.

Oh, you mean inline? Variable x is first used on line 55, so it's declared on line 54? So then when you meet it on line 233, you need to scroll back to see its declaration, and can't scroll to the top because declarations are scattered around the code? And what if there's a need for that variable earlier in the code, so a new line mentioning it at line 33 is inserted, and it's not declared until line 55 (line previously known as 54), what happens then? I guess compile error, find the declaration, move it up. Not that I think that any piece of code should be longer than 50 lines to start with, but it happens.

IMO, one neat thing about the variable declarations is that they're grouped on top, just like they once were in single-pass compilers, so when you need one you know where to look. You may scatter them throughout the code, but that decreases readability, IMO, and then you at least have to search up and down. Well, the more you read the code, the better you know it...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform