Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who Called Me?
Message
 
To
30/10/2000 19:19:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00436100
Message ID:
00436528
Views:
21
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform