Skip to content

Disallow qualifiers as member function attributes in prefix notation #20474

@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

Bolpat reported this on 2024-06-24T11:35:45Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=24627

CC List

  • Bolpat

Description

Issue 4070 was rejected on the grounds of symmetry. My sense is that Walter’s objections are invalid. There is precedent for asymmetry on function declarations:
`ref` prefix-only.

Worse, `ref const int f() { }` really, really looks like `const` applies to the return type.

If breakage is deemed too much, this can be done in the next edition of D (assuming editions are being implemented). All prefix type constructors should be applied to the return type. Everything that affects the function (or function type) or the implicit this goes at the end as a (member) function attribute.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions