[GnomeMeeting-devel-list] Comments on the coding rules in the wiki



Hi,

here are a few comments on the coding rules in the wiki, mostly the
first half:
* it enforces a gm_ prefix, while most of the code uses gnomemeeting_;
in fact, I think we should perhaps use gnomemeeting_ for things in lib/,
and gm_ for things in src/: the former are supposed to be gm-agnostic,
and the last to be gm-specific (I think the latest code uses that
convention already);
* the current code uses "GMObject" as key name, and not "GmObject" as
the wiki says;
* it enforces the gm_ prefix for both public and static functions: I
would rather have publicly available functions with a prefix, and static
functions without prefix, to know which can be changed with a local
impact, and which have a more global impact;
* it enforces passing the GtkWidget* and not the internal structure for
both internal(static) and public functions: why add a g_object_get_data
in all the static functions, while they are internal!? The static
functions&callbacks are defined, visible and used behind the wall that
hides the internal structure: they should get it directly.

I think there are two important dichotomies in gm's code:
* lib/ vs src/: the first contains code that other project should be
able to just copy as-is to use, the second contains code that is
specific to gm: that is why I propose to prefix the functions with a
clear gnomemeeting_ in the first case, while a simple gm_ should be
enough in the second case;
* internal vs public functions/callbacks: the rest of gm only knows a
GtkWidget*, and has only that information to give to the public
functions. So the public functions should all get that GtkWidget* in
some way or another. But all the internal functions are... internal, and
hence, will only use the internal structure: they should get it by
default, and not the GtkWidget* that they don't care about anyway.

Snark




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]