Skip to content

std.algorithm: set accidentally exposed methods to private#4315

Merged
andralex merged 1 commit intodlang:masterfrom
wilzbach:algorithms_private_cleanup
Jun 18, 2016
Merged

std.algorithm: set accidentally exposed methods to private#4315
andralex merged 1 commit intodlang:masterfrom
wilzbach:algorithms_private_cleanup

Conversation

@wilzbach
Copy link
Contributor

follow-up to #4312. This includes a couple of accidentally exposed publicly exposed methods - they weren't documented.
For permutations I added deprecations, but I would prefer if we can live without them ;-)

@wilzbach wilzbach force-pushed the algorithms_private_cleanup branch from b71b04e to 53fa15b Compare May 12, 2016 15:59
Copy link
Member

@burner burner May 13, 2016

Choose a reason for hiding this comment

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

this must be a property

update:
pure nogc nothrow safe

@burner
Copy link
Member

burner commented May 13, 2016

I think the renames from ID to _ID are useless. That is what "this." is for.

Copy link
Member

Choose a reason for hiding this comment

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

IMO the schedule for removal is to short. Has this been discussed somewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

@wilzbach typically, deprecations are between a year and two years

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK Permutations is a very recent addition and the internals of permutations where never publicly documented, that's why I thought just six months would be okay. Imho no deprecation should also be okay, because I can't imagine someone digging through the phobos source code and using the state variable.

Copy link
Member

Choose a reason for hiding this comment

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

AFAIK Permutations is a very recent addition and the internals of permutations where never publicly documented, that's why I thought just six months would be okay. Imho no deprecation should also be okay, because I can't imagine someone digging through the phobos source code and using the state variable.

Almost one year old. If it hadn't part of a release already it would have been okay, however everything that was (even once) should follow the proper deprecation path.

I cannot imagine someone digging through the source code and accessing Dalvik's internal and modifying the system loader, yet it's done on most of the phones out there.

Copy link
Member

Choose a reason for hiding this comment

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

but you don't know what people do.That is the point here. Just because you wouldn't, does not mean somebody else wouldn't.

@wilzbach wilzbach force-pushed the algorithms_private_cleanup branch from 53fa15b to ccc84b2 Compare May 15, 2016 20:28
@wilzbach
Copy link
Contributor Author

I think the renames from ID to _ID are useless. That is what "this." is for.

Yes absolutely, but needed for the deprecation - otherwise you would have conflicting names.

I cannot imagine someone digging through the source code and accessing Dalvik's internal and modifying the system loader, yet it's done on most of the phones out there.

Updated to June 2017 - is this ok?
(and addresses @burner's comment about the properties)

@dnadlinger
Copy link
Contributor

dnadlinger commented May 15, 2016

Doesn't this break l-value access to the fields in its current form?

@wilzbach wilzbach force-pushed the algorithms_private_cleanup branch 2 times, most recently from 226f603 to d76ed13 Compare June 4, 2016 14:11
@wilzbach wilzbach force-pushed the algorithms_private_cleanup branch from d76ed13 to 0c100a7 Compare June 4, 2016 14:13
@wilzbach
Copy link
Contributor Author

wilzbach commented Jun 4, 2016

Doesn't this break l-value access to the fields in its current form?

Yes it did. I still think that someone should be punished if he fiddles with that, but it now triggers proper deprecation warnings ;-)

@JackStouffer
Copy link
Contributor

LGTM

@andralex andralex merged commit ac9c93c into dlang:master Jun 18, 2016
@wilzbach wilzbach deleted the algorithms_private_cleanup branch June 18, 2016 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Comments