> I was noticing while creating the Fl_Tree API I had some second thoughts
> about function naming.
>
> Things like: open() / close() / select() / deselect() all seem obvious enough,
> but when testing to see if something is selected, seemed one could go
> either present or past tense:
>
>     is_open() vs. is_opened()
>     is_close() vs. is_closed()
>     is_select() vs. is_selected()
>
[..]

In the examples, "opened" isn't just the past tense of the
verb "open," it's also an adjectival form of that verb. "Open"
is itself an adjective as well as a verb, and the meanings
of "open" and "opened" (as adjectives) are roughly the same,
so either is_open or is_opened expresses the desired concept.

"Close" is also an adjective as well as a verb, but its meanings
include "nearby" and "lacking air," not the opposite of "open,"
so is_close sounds weird in context.

Similarly with "select."  Unless is_select means "it's something
really special," like a nice cut of meat, it sounds odd. It
doesn't convey the meaning that the thing is, er,  selected.

In my view, a helpful way to think about this is to drop the
idea of tense and concentrate on making sure that the word
on the right of the is_ has the intended meaning when used as
an adjective.

Best,
Stan


_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to