I'm always amused by something that says "end of story" at the beginning of the third paragraph from the end... :-) I'm also curious about some of your sweeping statements, here, because they don't make instant sense to me, and you didn't give me much to work with in figuring them out.

To begin with, I haven't ever "used" Lisp, though I'm somewhat familiar with it, but from Lisp's general reputation, I'm assuming that when you say "faster" you don't mean "faster in execution time", since if you were worrying about execution time you'd be using something... er, faster. :-) So do please correct me if I'm wrong on that (since I'm going to ignore that consideration henceforth).

That said, where is the advantage to the division of function names you propose? I can imagine some cases where it would be advantageous to have your test function return an object rather than a simple "to thine own self be true", certainly (though I would guess fewer in Perl than Lisp), but in that case, why have a second function which does the same amount of work and returns something else? Since the you can return any old Perl object and have it test True in boolean context, what's the need to have two functions for it?

"Subroutines that evaluate to true or false should be distinguished from ones that return a value."

Generally speaking, I agree--but I don't think functions that ask true-false questions should return much other than true or false, personally. Assuming that you do (for reasons hypothecated above) want to do so, why not do it all the time?

None of this, of course, goes to show that your points are wrong, but merely that I do not understand quite what you're getting at--might I be enlightened?



If God had meant us to fly, he would *never* have given us the railroads.
    --Michael Flanders


In reply to Re: Re: Question Marks in Subroutine Names by ChemBoy
in thread Question Marks in Subroutine Names by dug

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.