The "no gc" crowd
Adam D. Ruppe
destructionator at gmail.com
Wed Oct 9 12:00:05 PDT 2013
On Wednesday, 9 October 2013 at 08:05:30 UTC, Andrei Alexandrescu
wrote:
> I'm hesitant about stuff that computes function summaries such
> as __traits(getFunctionsCalled, function) without allowing
> those summaries to make it into the function's signature or
> attributes. It makes separate compilation difficult.
That's the verification of the attribute. You can still attach
the attribute to a prototype without a body for separate
compiliation (this is the same as @safe - the prototype could be
lying and the compiler can't verify, but you trust the annotation
is correct).
The advantage __traits(getFunctionsCalled) has over a built-in
@nogc is simply that we can define it all in the library, and add
more, combine ones*, etc., without changing the language again.
* A library uda could be defined to check @everything || @nogc or
whatever, since it is ultimately implemented as a static assert
which can do it all too.
More information about the Digitalmars-d
mailing list