Customized @safe like semantics for user attributes?

d coder dlang.coder at gmail.com
Fri Mar 15 06:05:01 PDT 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130315/f2a1bc52/attachment-0001.html>


More information about the Digitalmars-d mailing list