Consider struct types for TickitPosition and TickitOffset

Registered by Paul "LeoNerd" Evans on 2015-06-26

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(TickitPos?) or TickitOffset. This moves the decision out of the immediate API.

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

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.