Most languages have a ‘private’ keyword, or other mechanisms to prevent procedures/methods/subroutines/functions from being called if they’re designed to be used only from within certain places.
- dangerousService - might cause damage
- checkedDangerousService - does some checks, then invokes dangerousService
It would be nice to be able to restrict access to dangerousService from all services except checkedDangerousService.
That’s a frivolous example. More reasonably, this kind of control maintains architectural tiers.
Does WM provide a way to enforce this?
If not, what conventions do you use to prevent yourself or others calling a service you should not?