Replies: 1 comment 1 reply
-
Thanks @gutley, yeah those points totally make sense. I moved this extension from the Shared target into BrowserKit on PR #12718. If you wish to make changes to improve the naming, I'll gladly review the PR. Thank you! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Because:
removing(_ string: String?)
to make it clear its a non-mutating-returning func. (But see 3)remove
orremoveXXX
so this one's differing semantics is confusing.replacingOccurrences(of:)
maybe a clearer name would beremovingOccurences(of:)
Also, not keen on it accepting an optional string. None of the normal string manipulation funcs in stdLib behave that way and none of its existing call sites can ever pass in a nil parameter anyway.
I did say it was pedantic 😀
Beta Was this translation helpful? Give feedback.
All reactions