Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Who Called Me?
Message
 
À
30/10/2000 19:19:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00436100
Message ID:
00436528
Vues:
22
Larry,

The issue is not whether you can find out who called, it is that needing to know who called weakens the internal cohesion of the called function. IOW, the called function must behave differently depending on who called. While this may not be an immediate problem it is certainly waiting to become a problem. As the system evolves, say a new function needs to call this one and it needs still a different functionality. With this approach, eventually, the called function will become a huge DO CASE construct with new cases being added for every new need. This will become a maintenance nightmare after a while.

George's comment is based on the principle that a single function should do one thing very well and only one thing.

The point being that simply needing to know who called is indicative of a faulty function design.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform