Consider struct types for TickitPosition and TickitOffset
Registered by
Paul "LeoNerd" Evans
The discussion on whether Tickit APIs are line- or column-major can be almost entirely averted, if every function that takes a notional "position" or "offset", instead took a simple two-int struct of TickitPosition(
Perhaps then to avoid quite so much typing at callsites, we could provide some macros that create the obvious structures from two integer arguments.
#define TICKIT_POS_LC(l,c) ((TickitPos){.line = l, .col = c})
#define TICKIT_POS_XY(x,y) ((TickitPos){.col = x, .line = y})
might be one solution.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Paul "LeoNerd" Evans
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Discussion
- Series goal:
- None
- Implementation:
- Not started
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
(?)