in reply to Re: Question Marks in Subroutine Names
in thread Question Marks in Subroutine Names

Im a little confused. While I'm well aware of the convention of using the _p -p p suffix for predicate I really dont see how it or a question mark makes the functions following the is_XXXX covention (ie is_female()) more readable.

Its very clear (at least to me) that an is_XXXXX function returns a boolean (well, perls closest equivelent). What benefit do you derive from the extra marker? I can see how a function _not_ named is_XXXXX might need it, but then again we have a convention for that: is_XXXXXX.

(partly serious, partly not)

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.

Replies are listed 'Best First'.
Re: Re: Re: Question Marks in Subroutine Names
by belg4mit (Prior) on May 09, 2002 at 02:02 UTC
    1) I believe the use of p was intended as a replacement for the other forms
    2) I see it as an analog of "Hungarian notation"

    --
    perl -pew "s/\b;([mnst])/'$1/g"

      2) I see it as an analog of "Hungarian notation"

      You mean woefully painful and innappropriate to a language like perl?

      ;-)

      Yves / DeMerphq
      ---
      Writing a good benchmark isnt as easy as it might look.