Client API pedantism

Daniel van Vugt daniel.van.vugt at
Mon Apr 8 03:16:35 UTC 2013

Hi all...

It's nice that the Mir client API uses a common pattern that many C 
developers will find familiar:

   namespace_class_method(NamespaceClass *x, ...);

I like it. Just be careful about breaking the pattern. For example:

   mir_surface_create(MirConnection *connection, ...);

Arguably, this should instead be something like:

   mir_connection_createsurface(MirConnection *connection, ...);

Because you're not operating on a surface (mir_surface_whatever) until 
the surface exists.

I'm not sure I'd go as far as proposing a change to the above function 
any time soon. But it's worth keeping consistency in mind for future API 

- Daniel

More information about the Mir-devel mailing list