Drop from a member name the prefix that classified it - #125
Merged
estebanzimanyi merged 1 commit intoSep 3, 2026
Merged
Conversation
estebanzimanyi
force-pushed
the
fix/ooname-strips-matched-prefix
branch
2 times, most recently
from
September 3, 2026 00:17
901cf02 to
7360ede
Compare
A method's `ooName` is its function name with the class's token dropped, and the token tried is the class's own lower-cased name. A class whose C prefix is something else keeps that prefix in every member: `Geometry` is reached by `geom_*`, `Geography` by `geog_*` and `GeomSet` by `geoset_*`, so their members read `geomBuffer`, `geogFromHexewkb`, `geosetStartValue` — the class named twice, once by the receiver and once inside the call. The classifier already knows which prefix matched, since that is how it chose the class, so the name drops that prefix too, longest match first. 55 members across those three classes lose it and no class ends up holding two methods of one name. One token goes, not every repetition of it: `set_set_subspan` keeps its `setSubspan`, the inner `set` being part of what the member says.
estebanzimanyi
force-pushed
the
fix/ooname-strips-matched-prefix
branch
from
September 3, 2026 00:23
7360ede to
d2c27ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A method's
ooNameis its function name with the class's token dropped, and thetoken tried is the class's own lower-cased name. A class whose C prefix is
something else keeps that prefix in every member:
Geometryis reached bygeom_*,Geographybygeog_*andGeomSetbygeoset_*, so their membersread
geomBuffer,geogFromHexewkb,geosetStartValue— the class namedtwice, once by the receiver and once inside the call.
The classifier already knows which prefix matched, since that is how it chose
the class, so the name drops that prefix too, longest match first. 55 members
across those three classes lose it and no class ends up holding two methods of
one name. One token goes, not every repetition of it:
set_set_subspankeepsits
setSubspan, the innersetbeing part of what the member says.Stacks on #124.