RFC: DIP draft for "Compiler-defined Attribute Consistency"

Rune Morling ermo at serpentos.com
Wed Jul 21 22:43:49 UTC 2021

On Wednesday, 21 July 2021 at 20:46:01 UTC, Paul Backus wrote:
> Here's my take.
> D's attributes can be divided, conceptually, into a few 
> different "groups" of related attributes. Some examples are:
> (...)
> 4. The **Function Attribute Group**: `pure`, `nothrow`, 
> `@nogc`, `@safe`, `@system`, `@trusted`, `@property`, and 
> `@live`.
> ...and so on.
> The rule I propose is that *within a single group*, use of `@` 
> should be consistent--either all of the attributes should use 
> it, or none of them should.
> Of course this invites some debate as to where exactly one 
> ought to draw the group boundaries (e.g., should `@property` be 
> counted as part of the function attribute group, or is it a 
> separate thing?). But it is at least a step forward from the 
> current discussion, which does not even acknowledge that these 
> groups exist in the first place.

I like this approach.

Consider the idea internally consistent groups acknowledged.

For the current DIP to go anywhere, we'd probably need to 
agree/converge on how to divide all attributes into a reasonable 
set of groups?

Once we have that, we can then discuss inter-group consistency 
and propose the relevant changes.

What other group distinctions would make sense (if any)?

More information about the Digitalmars-d mailing list