DIP 1012--Attributes--Preliminary Review Round 1
Neia Neutuladh
neia at ikeran.org
Thu Dec 20 17:24:14 UTC 2018
The proposal says that builtin attributes are replaced by UDAs
defined in the runtime. But user-defined attributes don't work
like @safe, @system, and @trusted:
---
struct Attr {}
@Attr @safe:
class Foo
{
// this function is @safe but not @Attr
void doStuff() {}
}
---
In order to make the proposal work as intended, in a
backwards-compatible way, the attributes in core.attributes need
to be able to specify whether they descend into nested
declarations or not.
It would be handy for arbitrary user-defined attributes to be
able to specify this, too.
More information about the Digitalmars-d
mailing list