[cairo] API Shapeup, setters and getters consistency, get vs current

Bill Spitzak spitzak at d2.com
Wed Feb 16 12:32:36 PST 2005



Keith Packard wrote:
> Around 18 o'clock on Feb 15, Carl Worth wrote:
> 
> 
>>Having both "get" and "current" would require also explaining why in
>>the documentation, and I think this just makes things harder, not
>>easier, to understand.
> 
> 
> Ok, I'll buy in.  In Xlib, there are 'Get' functions and 'Query' functions 
> along with 'Destroy' and 'Free' functions, both sets prove a constant 
> source of confusion.
> 
> I think the rule here is that synonyms have no place in the API.

A similar confusion from Xlib is whether a function takes a GC, Window, 
Visual, VisualID, Colormap, Screen, or something else as an argument. 
This needlessly exposes internal implemenation details. If every call 
only took a GC it would be a lot easier to deal with and it might be 
possible to create an Xlib program without keeping the reference manual 
next to you.

So I agree that calling everything "get", no matter where they are 
stored, is the correct thing to do.



More information about the cairo mailing list