On 2017-05-22 17:05, Andrei Alexandrescu wrote:
-- Andrei

About the custom attributes that are mentioned, like "has acquired a lock" attribute. This would be a perfect candidate for a UDA and using the compiler as a library to implement a domain specific checker for this feature. When the regular compiler sees this attribute it has no meaning to the compiler. But when running the custom checker it will perform some additional checks to verify that the code behaves according to the specific domain requirements.

Without knowing any details, it might be possible to implement similar checks today by modifying druntime and replace the RTInfo template with a custom implementation that performs some additional checks.

/Jacob Carlborg

Reply via email to