ponyc
ponyc copied to clipboard
String find/rfind change (RFC #80)
Change the return type of String.find and String.rfind from ISize to USize, aligning its return type with Array.find.
See RFC #80 for details.
@hovsater I want to get this in before the release at the end of the month. I am happy to do, but didn't want to "swipe it from you" if you were wanting to do. Let me know if you want to do it.
Thanks for the ping, @SeanTAllen. I definitely want to do this. I'll open a draft PR shortly for the compiler itself. How do we address usage in Pony packages? I remember you said the same person should do that. Should I search for usage?
We test them with each nightly for breakage, so after it's merged, within 36 hours, we'd know.
@hovsater i want to get this in by Monday to have enough time to fix breakage before the release next weekend. Can you do that or should I get this?
@hovsater i want to get this in by Monday to have enough time to fix breakage before the release next weekend. Can you do that or should I get this?
Sorry for the silence. I've been super busy with work and family, so I doubt I'll have a chance to address this before end of month.
Feel free to jump on it if this is urgent. I'd be happy to finish it, but likely that would be sometime in early February.
I started to do this RFC and I am pausing. We need to discuss the RFC and if we want to go forward. It might not be extensive enough. Throughout string, we have things like:
fun ref cut_in_place(from: ISize, to: ISize = ISize.max_value())
Which doesn't make a ton of sense with the find and rfind change from ISize to USize for return type. We need to review all the offset related methods (some are USize and some are ISize) and make sure we want to make this change without doing others.
We are going to move forward with the RFC.
Whoever picks this up needs to be very careful. Make sure for everything in String that is changed by this change that there is test coverage to verify that the math being done on offsets doesn't get messed up by going from signed to unsigned.