New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kill the syntax alias this = sym
;
#1413
Conversation
I fixed the failure which appears in auto-tester result. |
To @WalterBright and @andralex |
I personally think |
In the spec discussion, @ntrel pointed out about a syntax for super class constructor aliasing.
I had no thought about it, but I don't want to kill the possibility of forgive such syntax. |
One thought - it would be pretty odd if we allowed both |
I think
|
I opened documentation fix related to this. |
andralex:
True, but isn't that a short term issue? But if we stay with the current master, is there a way to allow superclass constructor aliasing (assuming that's a sensible feature)? It would be nice to have. Would a template solution be as robust as aliasing regarding corner cases? I would vote for |
Bottom line I'm leaving this decision to @9rnsr and @WalterBright. All I'm saying is that |
ping |
Unfortunately I think it might be too late for this. I've seen several examples of people already using this syntax in their code. It's very likely the pull would break code now. |
NO. One month, one release is not too late. This syntax was not deeply discussed in forum. There was just only little discussion on the github pull request. It was MY WORST mistake in 2.061 development. WE MUST RESET things. @andralex Please, PLEASE reconsider. |
@9rsr if you feel so strongly about it no problem from me. @WalterBright? |
Thanks, @andralex !! |
The real issue is that @WalterBright completely ignored the messages in this pull and went ahead with a release. |
It'd do this community a lot of good if people would stop assuming malice when simple unawareness is far more likely. If there's issues that should block releases, those that are aware of the blockers really need to raise them. Don't assume that every pull request and every thread is read by those that need to see them. |
Not malice, but simply lack of good decision making. Releasing the compiler at January 1st and giving out the beta in the last weeks before new years eve was a bad idea, there was barely anyone around to test the betas. |
It would also do this community a lot of good if we actually had a schedule for the releases, rather than randomly deciding when it's a good idea to start releasing the beta's, and waiting for Walter to randomly pick when the final version is released. |
I proposed entering the beta cycle on the beta mailing list on 2/1. I presume those who care about such things will be subscribed to that list. |
@9rnsr I agree with removing the syntax for the time being. |
Kill the syntax `alias this = sym`;
Merge pull request #1413 from 9rnsr/x3011
Thanks!! |
Kill the syntax `alias this = sym`;
Any progress on I don't think that |
True, it wouldn't conflict, but if |
What's the use-case for the long type expression? With what would you overload a constructor but a base class constructor? To me it looks like |
When assignment-style syntax for alias declarations was first implemented in DMD 2.061 [1][2], `alias this = identifier;` was accepted as equivalent to the existing `alias identifier this;`. One release later, in DMD 2.062, it was removed. [3] The rationale for this change, given in both the changelog [4] and a related spec PR thread [5], was to allow for the possibility that, in the future, the syntax `alias this = super.this;` might be used to merge a derived class's constructor overload set with that of its base class. However, this proposal was never implemented, and seems to have been abandoned in the intervening years. For the sake of consistency, and since the rationale for its removal no longer applies, this commit reinstates `alias this = identifier;` as valid syntax for an `alias this` declaration. [1] dlang#1187 [2] https://dlang.org/changelog/2.061.html [3] dlang#1413 [4] https://dlang.org/changelog/2.062.html [5] dlang/dlang.org#200 (comment)
When assignment-style syntax for alias declarations was first implemented in DMD 2.061 [1][2], `alias this = identifier;` was accepted as equivalent to the existing `alias identifier this;`. One release later, in DMD 2.062, it was removed. [3] The rationale for this change, given in both the changelog [4] and a related spec PR thread [5], was to allow for the possibility that, in the future, the syntax `alias this = super.this;` might be used to merge a derived class's constructor overload set with that of its base class. However, this proposal was never implemented, and seems to have been abandoned in the intervening years. For the sake of consistency, and since the rationale for its removal no longer applies, this commit reinstates `alias this = identifier;` as valid syntax for an `alias this` declaration. [1] dlang/dmd#1187 [2] https://dlang.org/changelog/2.061.html [3] dlang/dmd#1413 [4] https://dlang.org/changelog/2.062.html [5] dlang/dlang.org#200 (comment)
In the pull dlang/dlang.org#200, we discussed to replace the syntax
alias this = sym;
, which introduced by the pull #1187.To keep the discussion continuable, we should not contain the syntax in 2.061 release.
(As far as I know, it is not deeply discussed in @1187.)
@WalterBright , please merge this in 2.061 release.