Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable/field naming conventions
Message
De
28/03/2007 05:10:38
 
 
À
27/03/2007 15:00:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01208623
Message ID:
01209120
Vues:
13
>>I see no reason not to use the conventions (besides what Craig said, which I don't follow - I don't see how it can hurt). I go further and prefix with "l" or "g", depending on whether the var is local or global, respectively. I use MapInfo's MapBasic language, to automate mapping, and they use the same naming conventions as FP in their examples and Help file.
>
>I think naming conventions are the lesser evil in dynamically typed languages like vfp, vb script python and so on. The two letter conventions try to give the code at least part of the knowledge a statically typed language has - which IMHO is a greater benefit than the brittleness it introduces.
>If you change a variables datatype you have to fix all the names or have a situation similar to wrong docs: better to have none at all if you don't follow through and rename them. Hurt is too strong a word, but this is detrimental in my book.
>
>When coding in statically typed languages I did not follow hungarian convention even when it was thought best practice (as my style of writing c code was much influenced by writing modula code: the same freedom if you have to change types, but clearly marked in the code and otherwise I was "protected" by the compiler). But there were some C modules I read that I was glad were writtten in hungarian notation<g>. As I have mostly written vfp in the last decade, this convention comes almost automatically, but I guess I would make a conscious effort if I were to code a long stretch in C# of java.
>
>my 0.02 EUR
>
>thomas

Well, as you know, the Euro is only worth c. £0.68 so your 2 cents' worth is worth less than my two penn'orth :-)

BTW, I've heard Frenchmen referring to Euro cents still as centimes; do the Germans refer to them as pfennig still?
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform