Skip to content
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

Remove unused debug writelns in std.algorithm #5180

Merged
merged 1 commit into from Mar 1, 2017

Conversation

JackStouffer
Copy link
Member

These didn't even work because std.stdio wasn't imported. I highly doubt anyone was using them, and they're not particularly useful anyway.

Copy link
Member

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that this cruft is a relict from times in which D wasn't that stable, so I leave this to someone with a longer history to sign off.

FWIW I think that a beautiful language (and D tries to be one) shouldn't require such redundancy for such a "simple" feature of reporting unittest results.
I am still hoping to see DIP83 come alive at some point...

a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
assert(remove!(SwapStrategy.stable)(a, 1, 3, 5)
== [ 0, 2, 4, 6, 7, 8, 9, 10]);
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
//writeln(remove!(SwapStrategy.stable)(a, 1, tuple(3, 5)));
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can then be removed as well?

a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
assert(remove!(SwapStrategy.stable)(a, 1, 5) ==
[ 0, 2, 3, 4, 6, 7, 8, 9, 10 ]);

a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
//writeln(remove!(SwapStrategy.stable)(a, 1, 3, 5));
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can then be removed as well?

@@ -1871,18 +1850,15 @@ if (s == SwapStrategy.stable
[ 1, 2, 4 ]);

a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
//writeln(remove!(SwapStrategy.stable)(a, 1, 5));
a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can then be removed as well?

@JackStouffer JackStouffer force-pushed the algorithm-cruft branch 2 times, most recently from 5b953ed to 9214a85 Compare February 22, 2017 15:45
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is harmless and won't break any existing PR on the same module

@wilzbach wilzbach added this to the 2.074.0 milestone Feb 26, 2017
@andralex
Copy link
Member

That code was mightily useful back in the days when dmd had more bugs than features :)

@JackStouffer
Copy link
Member Author

Auto-merge toggled on

@JackStouffer JackStouffer merged commit f6b25d2 into dlang:master Mar 1, 2017
@JackStouffer JackStouffer deleted the algorithm-cruft branch March 1, 2017 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants