-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Deprecate String#codepoint_at #8475
Deprecate String#codepoint_at #8475
Conversation
Deprecated methods should not be used, so please remove its uses in stdlib. But they continue to be tested in the spec suite, that's where the warnings come from (see discussion in #8454). |
@straight-shoota Sorry, I'm confused now. By stdlib do you mean only the The only usage is currently in specs, and those specs are not for From #8454 (comment)
So should I remove the usage of |
Oh sry, I was under the impression there was a single "real" use somewhere in stdlib.
Well, essentially all uses except those where specifically this method is tested should be removed. In this case, there are none. But "escapes with unicode" acts as such, so I guess we should leave it for now and only change that with #8476. |
I'm still not sure why we removed this... |
No real world usage as described in the original issue #8449?
|
I think the number of actual usages don't matter. Crystal is not a hugely popular language. It's good to have the option to easly get a codepoint of a char. That's what makes Ruby great, the many shortcuts you have to things, to avoid boilerplate code or doing many hoops. But if others think removing this was fine then it's fine. |
It's not late yet to revert before the release. |
@asterite Useful shortcuts are great. But |
`String#codepoint_at` is deprecated in Crystal crystal-lang/crystal#8475 and to be removed in this PR crystal-lang/crystal#8476
Ref #8449
I'm not sure if the use of
String#codepoint_at
should be removed in this PR or in follow-up PR whereString#codepoint_at
is removed.I see some other deprecation warnings when running crystal specs, so I assume it may be intentional and serves as a reminder to remove usage later when the method itself is removed.
Let me know if
String#codepoint_at
usage should be removed in this PR.