Closed asmello closed 2 months ago
Ugh, thank you. That one is especially embarrassing 🤦🏻♂️.
I'll deprecate it and rename for 0.4.
Awesome! I think you meant the rename for 0.5 though? We are at 0.4.x releases.
I meant I’ll rename it but alias the existing, improperly named, fn to the new and deprecate it.
On Tue, Mar 19, 2024 at 6:52 PM André Mello @.***> wrote:
Awesome! I think you meant the rename for 0.5 though? We are at 0.4.x releases.
— Reply to this email directly, view it on GitHub https://github.com/chanced/jsonptr/issues/28#issuecomment-2008296933, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGFZENJSYNNZ6U3CZUDV3YZC6ULAVCNFSM6AAAAABE6NR66OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBYGI4TMOJTGM . You are receiving this because you commented.Message ID: @.***>
When used as an operator, the term
union
conventionally alludes to the set theoretical definition. From Wikipedia:In more concrete terms, when given two sets of items, their union is the set of all elements from either set. So when the term is applied to a JSON Pointer, one might expect that the result would somehow contain the tokens from both inputs, when in reality it only contains their shared part. This more accurately represents an intersection operation, which is the opposite of a union, so the naming is surprising and easily leads to confusion.
The most accurate term would be longest common prefix, as this is the algorithm that the method implements. To keep it short, the abbreviation
lcp
is often used. I thinkintersection
would probably also be fine, though.