Rename internal functions _raw* -> _*_ #915
Merged
+95
−95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So instead of
lfs_file_rawopencfg
, it's nowlfs_file_opencfg_
.The "raw" prefix is annoying, doesn't really add meaning ("internal" would have been better), and gets in the way of finding the relevant function implementations.
I have been using
_
s as suffixes for unimportant name collisions in other codebases, and it seems to work well at reducing wasted brain cycles naming things. Adopting it here avoids the need for "raw" prefixes.It's quite a bit like the use of prime symbols to resolve name collisions in math, e.g.$x' = x + 1$ . Which is even supported in Haskell and is quite nice there.
And the main benefit: Now if you search for the public API name, you get the internal function first, which is probably what you care about.
Here is the exact script:
This should only affect internal symbols, and have no impact on API compatibility.
This PR will rerun and brought in last on the next minor release, to minimize impact to other PRs.