Dejan Lekic wrote:
>> FLTK mostly uses "xyz(value)" to set, and "xyz()" to get.
>
> And I just _love_ that approach!
Seems fine to me.
The only way it might get confusing is if xyz is an action verb,
like "explode", in which case a programmer might accidentally code:
// Set rocket to explode
rocket->explode();
..but all it does is return a value, and not do the action
without an argument. So the code might read ok, but doesn't
actually do what it looks like it does.
That said, I'm all for consistency, just document whatever it is
in the coding standards so we know when to use set/clear vs the above,
and including a quick sentence or two describing the rationale
behind the namings, to help programmers remember the naming rule.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev