more appropriate on conditional#399
Conversation
|
Hi @gregoryyoung, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
|
Hi @gregoryyoung, the documentation for the IndexOf api is very specific: https://msdn.microsoft.com/en-us/library/system.string.indexof(v=vs.110).aspx I agree that both pieces of code will have the same effect. I'm not sure that one is more appropriate than the other. Does that make sense? Kevin |
|
To be fair even having a conversation about this isn't worth the time. I "It is true that if IndexOf future implementations decide to use other -ve Normally I would avoid such couplings (this code has specified that index Cheers, Greg On Fri, May 1, 2015 at 8:09 PM, Kevin Ransom (msft) <
Studying for the Turing test |
|
👍 for guarding by check for validity. It's more robust. |
|
Given that the current code is correct and there is no bug, I don't see a motivation to make this change. |
|
So no refactors should ever be submitted as a pull request? |
|
@gregoryyoung you may not follow the repo and issues as closely as some of our other contributors, and therefore I will refer you to a couple of our prior postings which may answer your questions. From time to time we will modify our PR acceptance criteria due to the state of the repo or where in the project cycle we are situated. When that happens we will call it out to our contributors to ensure they use their time making valuable, timely contributions. We do not wish you to waste your time on PR's that will not be pulled any time soon, especially when we are getting ready to ship. Right now as both posts state we will be pleased to accept bug fixes, where those fixes containing the minimum delta necessary to effect the change. We are minimizing risk to the product of unintended side effects. Refactoring and code cleanup will happen when we have more time before the next release. Even @dsyme is subject to this work flow, this PR File renamings and code cleanup #357 will not be accepted any time soon. Thanks again Kevin |
Was just reading through this code and saw the <> -1. >= is more appropriate as -2-int.MinValue are invalid.