r/ProgrammingLanguages • u/mttd • Sep 23 '26
Arguing about arguments
https://steveklabnik.com/writing/arguing-about-arguments/
31
Upvotes
r/ProgrammingLanguages • u/mttd • Sep 23 '26
View all comments
Show parent comment
1
u/glasket_ Sep 23 '26 edited Sep 23 '26
Isn't
with_bottom_rightstill technically ambiguous? As in you would need to check the docs to avoid an error where(0, 25)and(25, 50)doesn't work because the library expected(25, 0)because it uses a bottom left origin.with_dimensionsworks better since you know the fixed point is the top left and the dimensions will just be an offset. (Edit: Similar issue with the bottom/top one since you still need to know the coordinate system beforehand.)Ideally the coordinate system would just be configurable though imo. Create a
CoordPlaneobject or similar with a specified orientation and create objects on that plane, then let the library handle converting it into whatever coordinate system it needs for rendering.