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

Hmm.
This certainly doesn't effect the way that I think about the question that I posed. A subroutine declaration like sub sex { # do stuff }; won't exist in my style of coding. And you're telling me that I'm adding ambiguity? :-)

Replies are listed 'Best First'.
Re: Re: Re: Question Marks in Subroutine Names
by belg4mit (Prior) on May 08, 2002 at 03:22 UTC
    hein? The sex method would return a value indiciating whether the object/individual was male or female.

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

      Sure, it could.
      If you go back and read the original post, this is about readability.

      ## # sub sex() # returns qw( yes no maybe somtimes male female # only_on_tuesdays when_i_get_older ) or a miryad of other # possibilities.

      That said, $obj->sex? could get interesting :)

      As a true or false question goes, sex will probably always return true, so no question mark needed, if that's what you were trying to say.
        I never lost sight of the fact that this was about readability, hence my two initial points
      • use of ? would add ambiguity (the antithesis of readability)
      • Incredibly_long_sentence_like_function_names are not readable and if you need/insist on that sort of large definition for something I think OO is a better route.
      • And yet when lachoy makes the second point here it isn't so difficult to accept.

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