Fabien Costantini wrote:
> We all clearly agree on making prototype and implementation match variable
> names, good.
> Now concerning the variable name ; I don't mind if they are long,
> I like them to be self uderstanding so I'll second matt on that,
> but please try to avoid capitals for functions parameters, except for single
> char variable names. If you have/want to use some capitals, please don't use
> them on the first char for parameters because it will interfere with type
> names.
Right.
For instance, I've been making simple fixes like like 'l' -> 'item'
in simple methods like these:
void* Fl_Browser::item_next(void* l) const {return ((FL_BLINE*)l)->next;}
void* Fl_Browser::item_prev(void* l) const {return ((FL_BLINE*)l)->prev;}
..so that it now reads:
void* Fl_Browser::item_next(void* item) const {return ((FL_BLINE*)item)->next;}
void* Fl_Browser::item_prev(void* item) const {return ((FL_BLINE*)item)->prev;}
I've been trying to 'standardize' on using consistent naming when possible
in the widget's prototypes + declarations, so the docs use the same names
for the same types of parameters.
For instance, in Fl_Browser, I've seen different methods use a variety
of names for the input item; lv, v, l, t, and probably others. Changing
those all to 'item' where possible (ie. if the change isn't too intrusive
to the code)
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev