Just my 2 cents on the matter.

First, I love named parameters, but use both styles -- named and unnamed. It all just boils down to the level of confidence that you have in the values, and respective ordering, that have been passed. If it is an internal function, method, subroutine, whatever that you are certain of the parameters, then named parameters are not really needed. However, if it is an interface exposed to the public where you are not certain of the ordering, then named parameters may be in order.

Next, there is no substitute for checking what is passed. Unexpected, or bad, programmatic behaviour happens when parameters and return codes are not checked. Never assume the sky is always blue.

Finally, BrowserUk is correct in saying that all the bits add up. One needs to take in to context what is being done and who is doing it. Memory footprint, CPU usage, and overall responsiveness of an application is just as important as what the application accomplishes. Too often one comes across a "Swiss army knife" application that does everything but does nothing well because of its' design. Personally I would rather have an application that does one thing really well than an application that tries to do many things and is hard to maintain.

Like I said, just my two cents.

--Poet


In reply to Re^2: How should named paramater keys be named? by DeadPoet
in thread How should named paramater keys be named? by davido

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.