Overloading and optional arguments

Function overloading (having a several variants of a function
with the same name and different arguments) is a language
feature available in many languages but not in C.

In general, language binding authors should use restraint in
combining functions in the cairo API via function
overloading. What may seem like an obvious overload now may
turn out to be strange with future additions to cairo.
It might seem logical to make
cairo_set_source_rgb()
an overload of cairo_set_source(), but future plans to add
cairo_set_source_rgb_premultiplied(),
which will also take three doubles make this a bad idea. For
this reason, only the following pairs of functions should
be combined via overloading

Note that there are cases where all constructors for a type
aren't overloaded together. For example
cairo_image_surface_create_from_png()
should not be overloaded together with
cairo_image_surface_create().
In such cases, the remaining constructors will typically need to
be bound as static methods. In Java, for example, we might have: