DIP60: @nogc attribute
Rikki Cattermole via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 16 17:02:10 PDT 2014
On Wednesday, 16 April 2014 at 15:32:05 UTC, sclytrack wrote:
> What about adding custom annotations that don't do any checking
> by
> itself. Like when @nogc doesn't actually verify that the
> ~ is not used for strings.
>
> void hello() require(@nogc)
> {
>
> }
>
> Just a verification by the compiler that you use only routines
> that are marked with certain annotations.
>
> void boe()
> {
> }
>
> @(nasaverified)
> void test()
> {
> }
>
> //
>
> void hello() require(@(nasaverified))
> {
> test(); // ok
> boe(); // not ok.
> }
I really REALLY like this.
I can see it being rather useful. Assuming its expanded to
support UDA's.
Not quite sure what a use case is for it though.
More information about the Digitalmars-d
mailing list