[Issue 24024] cannot pass class this to ref class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 5 20:28:25 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=24024

--- Comment #7 from Walter Bright <bugzilla at digitalmars.com> ---
Consider UFCS and the ability to do a.foo() and foo(a). When `this` behaves
differently than a parameter, it generates a corner case with surprise
behavior.

Early on I spent much care to make the address of a nested function (i.e. a
delegate) indistinguishable from the address of a member function. This
symmetry and consistency turned out to be a big win.

Avoiding special cases as much as possible should pay off for us.

--


More information about the Digitalmars-d-bugs mailing list