This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: is_predicate_p?
On Sun, 09 Jun 2002, Nathan Sidwell wrote:
> I'd vote for the _p convention. FWIW I used to use the is_ convention and
> found it more awkward. I think the reason may be that with predicates
> you are asking a question, and in english you'd use a ? at the end of the
> sentance. The is_foo form looks a little like an assertion. May be a
> spanish speaker would prefer the is_ convention (or even is_foo_p :-)
>
In spanish we surround questions around two markers: ¿?. So, if
anything it looks even less like a question to us :)
I personally tend to use is_foo for adjectives (e.g.,
is_binary_expr) and foo_p for verbs (e.g., stmt_ends_bb_p).
We also have uses of _p for pointers. If we are going to use a
new convention I would rather get rid of _p entirely.
Diego.