Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wishlist???
Message
De
03/09/1999 08:00:28
 
 
À
03/09/1999 02:48:53
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00260725
Message ID:
00261060
Vues:
33
I admit that I don't see many uses for a static variable, but they can be usefull and respect a good OO design (IMHO). An example from the top of my head: let say that you have a class that cannot be instanciated more than once. Without a static variable, you need to create a public variable or something like that. Not very OOP. With a static variable, you could create it in the class, initialize it at .T. in the Init() and put it at .F. in the Release(). That way, the class encapsulate this behaviour and respect good OO design.

My 0.02CAN$

>I think OOP takes away much of this reqiurement. Private static vars could be compared with a property of an object. The local versions could be compared with a protected property.
>
>Personally I can't see other situations where this might be of any help. IMHO using this kind of variable *could* make programs more complex while there is no need to, when a good OO design is applied. It could be another feature which could confuse developers and make bad designs.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform