Conversation
|
Thanks for your pull request and interest in making D better, @IDONTUSEGH! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#22715" |
|
I forgot to run Phobos tests locally, I'll investigate the failures. |
|
I tried to implement this a couple years ago. |
I think keeping the scope small on clear contextual targets (erroring on ambiguity as early as possible) avoids the issues of trying to make it too generic. |
Following recent forum discussions regarding
.type inference that sparked my interest, it was noted that the dot syntax conflicts with module scope resolution.So after some digging, I found that using
$had been suggested as a viable alternative in past discussions.I couldn't find the original DIP (if there was any), so I decided to explore the feasibility of a
$based implementation.And it turns out the logic is suprisingly straightforward, and this PR demonstrates how it could be integrated.
To keep the scope manageable and code easy to read, the compiler will an error if the context is too ambiguous to resolve.
This was a fun week end project, I'm pretty excited about this feature.
https://forum.dlang.org/post/yegslrvshbtlqcchcufi@forum.dlang.org