Does the spec take priority over the compiler?

Neia Neutuladh neia at ikeran.org
Sun Dec 16 19:42:05 UTC 2018


On Sun, 16 Dec 2018 14:29:04 -0500, Steven Schveighoffer wrote:
> I would expect the @nogc propagation would require a
> language change.

A compiler change but not a spec change.

> Specifically, there's no good way to get the current
> behavior if you implement the propagation.

Your options:

1. Move your aggregates above the `@nogc nothrow pure:` line
2. Move your aggregates outside the `@nogc nothrow pure {}` block
3. Mark functions `@nogc nothrow pure` individually

> So you need some way to turn
> off @nogc in order to make it more encompassing.

That would be quite useful.

> But the fact that the
> spec says it should propagate probably increases the chances of a change
> getting accepted.

I'm not terribly confident.


More information about the Digitalmars-d mailing list