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 String#at #7633

Merged
merged 2 commits into from May 21, 2019

Conversation

@j8r
Copy link
Contributor

commented Apr 5, 2019

It is a duplicate of String#char_at, which is less explicit.
Nor String#at or String#char_at are documented, though public methods.
Not sure about the degree of deprecation we want (only a comment, using deprecated annotation or none?).

@j8r j8r force-pushed the j8r:remove-string-at branch 3 times, most recently from dfecdac to 991bab8 Apr 5, 2019

@wontruefree

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

Should there be a deprecation warning before removing something from the public API?

@j8r j8r force-pushed the j8r:remove-string-at branch from ad64d74 to 8974ac0 Apr 13, 2019

src/string.cr Show resolved Hide resolved

@j8r j8r force-pushed the j8r:remove-string-at branch 2 times, most recently from 5347bac to d466713 Apr 22, 2019

@j8r

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2019

The CI is still using 0.27.2 😕

@bcardiff

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

@j8r please rebase on master, the CI is updated now

j8r added some commits Apr 5, 2019

Remove String#at
It is a less explicit duplicate of String#char_at

@j8r j8r force-pushed the j8r:remove-string-at branch from 32b0877 to 65b88b8 Apr 24, 2019

@asterite

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

If we go this route we should probably deprecate/remove char_at. There's already #[].

@straight-shoota

This comment has been minimized.

Copy link
Member

commented Apr 25, 2019

I'm not sure about removing #char_at as well, but it might be a good idea.

@j8r

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

... why we'll remove String#char_at and keep others like Hash#fetch?

@asterite

This comment has been minimized.

Copy link
Member

commented Apr 26, 2019

Because fetch accepts a block that is used as the value, when the key is missing.

@RX14

RX14 approved these changes Apr 26, 2019

@j8r

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2019

Good to merge? If deprecating String#char_at is wanted, it can be another PR.

@RX14 RX14 merged commit afcdcfc into crystal-lang:master May 21, 2019

5 checks passed

ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_darwin Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RX14 RX14 added this to the 0.29.0 milestone May 21, 2019

@RX14

This comment has been minimized.

Copy link
Member

commented May 21, 2019

@bcardiff do we apply breaking change labels to deprecations?

@bcardiff

This comment has been minimized.

Copy link
Member

commented May 21, 2019

@RX14 yes 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.