Trip notes from Israel
Jacob Carlborg via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Tue May 23 23:34:06 PDT 2017
On 2017-05-22 17:05, Andrei Alexandrescu wrote:
> http://dlang.org/blog/2017/05/22/introspection-introspection-everywhere/
> -- 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
More information about the Digitalmars-d-announce
mailing list