So instead of lfs_file_rawopencfg, it's now lfs_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:
sed -i 's/_raw\([a-z0-9_]*\)\>/_\1_/g' $(git ls-tree -r HEAD --name-only | grep '.*\.c')
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.
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.