-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
Revert "Fix Issue 18665 - Deprecate Undocumented Operator Overloads" #10716
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#10716" |
|
You're talking about https://forum.dlang.org/thread/erktpojjcjmzvrbnxkpw@forum.dlang.org right ? I think @don-clugston-sociomantic 's point here is that, while deprecating The D1 operator overloads were deprecated for a reason, namely a bug found when they were coupled with D2 operator overloads. Said bug can of course be fixed, but there's an inherent complexity coming from the ability to have two ways to do operator overloading. I hope we can come up with better ways to deal with this issue than a flat out revert. |
So do I. But they need a fix now. |
|
I'm not sure that pushing this to stable is a good idea. If at all, it should be behind an opt-out switch since there is a very real reason for this being deprecated in the first place. |
|
There's no urgent reason to deprecate it now, and they need a fix now. |
|
I'm not sure how to rebase this to stable, as the instructions only apply if I have a local git version of the PR? Halp! |
|
Hardly, this has been deprecated for 6 months. That doesn't scream urgency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be behind an opt out switch, not reverted.
It's urgent because the user requires a major bug fix that was fixed in the newer compiler, but cannot upgrade because of this problem. |
|
Let me rephrase that: Why does |
The idea that everyone is using the latest compiler release is quite wrong.
This is correct. Note also that opIndex remains virtual, while opIn is not. That is a bizarre inconsistency. And because this makes a change from virtual to non-virtual, the effects cross from library to user code. To be clear: I think that deprecating opAdd and friends is basically a good idea. Arguably, the changes it makes it makes us make are good ones. It's only opCat and opIn that are a problem. |
I still don't see why |
|
Because that's a blunt instrument. They want to compile cleanly as a matter of policy (i.e. they like the other deprecations). They simply need more time to deal with this. It is not a problem to revert this change for the time being. |
That's literally the entire point of that switch, if it ain't sharp enough for this, why does it even exist?
Then put this behind an opt out switch. |
@don-clugston-sociomantic : From what I read, if the compiler was allowing you to reuse the name ( |
Oooh! That's a really interesting possibility. |
I find it useful as an exploratory tool. I use it while updating our libraries. But it's not suitable for use in production. Note that we're mostly talking about libraries here. If you address it by a compiler switch it affects every library which that developer uses. That's not a solution. |
|
That was a mostly rhetorical question, but perhaps |
|
Sorry, I did not intend to merge this. I think that the changes to the test suite should be reinstated. Only the deprecation messages should be removed, and even then, ideally only for classes, not for structs. (don hides in shame) |
|
I was going to say, How did this merge with a blocking review? |
|
Can you fix this up? |
|
I'm surprised that the merge button isn't disabled, actually. |
Reverts #10130
This is causing massive, expensive problems for one of our users.