On Thursday, 3 November 2022 at 05:10:06 UTC, matheus wrote:
https://dlang.org/spec/class.html

Thanks for the link and also thanks for confirming that you have no clue what's going on. I think that what actually happens is that the D code

```D
  A a2;
  a2.foo();
```

is roughly equivalent to C++

```C++
  A *a2 = NULL;
  a2->foo();
```

I see two problems here. First, the D language documentation is incomplete and does not cover this particular syntax. And second, D language is designed (intentionally or accidentally) to be hostile to the C++ developers trying to learn it. This particular issue is known as https://en.wikipedia.org/wiki/False_friend

Reply via email to