March 15, 2013
Hello

I am looking for @safe like semantics for a user defined attribute. Say the attribute is named @foo, then I want to make sure that functions declared with the attribute can call only the functions declared with the same attribute. There could be other possibilities as well, like a function without @foo attribute not being able to call a function with the attribute in its body.

As far as I know D does not allow static or dynamic implementation of such semantics today. But still I thought I should check it up with the experts on the group. Can this type of checking be created at compile time or even at runtime? If not, will it be a sound enhancement request?

Any ideas.

Regards
- Puneet