D Language Foundation November 2025 Monthly Meeting Summary

Dennis dkorpel at gmail.com
Wed May 6 10:44:18 UTC 2026


On Monday, 4 May 2026 at 15:41:46 UTC, Kagamin wrote:
> If explicit this is a parser change, what difference does it 
> make? Just for AST to be a uniform array of arguments?

The goal is to make the syntax clearer, because currently it 
often looks like the attributes apply to the return value instead 
of `this`.

```D
struct S
{
     int x;
     int* y;

     const int f() => this.x; // returns const(int)?
     scope int* g() => null; // returns a scoped pointer?
     ref int h() return => this.x; // 'return' what?
}
```

With explicit this, the code becomes:

```D
struct S
{
     int x;
     int* y;

     int f(const ref S this) => this.x;
     int* g(scope ref S this) => null;
     ref int h(return ref S this) => this.x;
}
```


More information about the Digitalmars-d-announce mailing list