Ordered operations and pointers #26
Labels
No labels
bug
duplicate
enhancement/documentation
enhancement/feature
enhancement/organization
question
rejected
upstream
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
UserCurt/mpath#26
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This issue proposes that the mpath operations are ordered, and the mpath pointers are ordered. They would implement
inequality operations (
>,<,>=,<=) and thesortmethod. This is already implemented to some degree, though this issue is put forward to account for the implementation of other operations in the future.Inter-operation comparisons should satisfy this ordering: CommaSeparatedListIndex < Brace (#5) < Paren (#5) < DotIndex (#2) < DotExact < DotGlob < DotRegex (#4) < DotSet (#3) < Identity
Intra-operation comparisons should follow the closest thing to lexicographic order:
Ahas fewer elements thanB, thenA<B. Otherwise, compare entries left-to-right until there is a difference.Ahas fewer dimensions thanB, thenA<B. Otherwise, compare left-to-right until a difference is found. IfA{i}has fewer dimensions thanB{i}, thenA(i) < B(i). Otherwise, compare left-to-right until a difference is found. IfA{i}(j)has fewer entries thanB{i}(j), thenA(i){j} < B(i){j}.letters < '?' < '*'Ahas fewer elements thanB, thenA<B. Otherwise, compare entries left-to-right until there is a difference.missingComparisons between mpath pointers should follow something similar to lexicographic order being composed of operations. If
Ahas fewer operations thanB, thenA<B. Otherwise, compare left-to-right until a difference is found between operations.