You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Core package strings should have Reverse() method, which will return a new String reversed.
I couldn't find any discussion or issue around it. What can be the reason to not have a basic string operation, used commonly by developers (though not much frequent).
Code using reversed (python) on github https://github.com/search?l=python&q=reversed%28&type=Code&utf8=%E2%9C%93 .. though most of them are learning exercises, but are we sure reverse is really not needed (even doing statistical analysis) etc? IMO, all generic libraries, should include implementations to avoid different developer implement it different way, and having bugs.
Activity
[-]Add strings.Reverse(...) method[/-][+]strings: add Reverse[/+]bradfitz commentedon Mar 11, 2016
Do you have numbers to suggest it's used commonly? I've never needed it, except maybe in programming exercises while learning a new language.
dominikh commentedon Mar 11, 2016
It's also not a "basic string operation" once you take all aspects of Unicode into account.
rskumar commentedon Mar 11, 2016
Code using reversed (
python) on github https://github.com/search?l=python&q=reversed%28&type=Code&utf8=%E2%9C%93 .. though most of them are learning exercises, but are we sure reverse is really not needed (even doing statistical analysis) etc? IMO, all generic libraries, should include implementations to avoid different developer implement it different way, and having bugs.bradfitz commentedon Mar 11, 2016
Sorry, I'm going to close this. I've never needed reverse for real programs.
This bug seems hypothetical at best.