A demotion is a negative promotion. A salary cutback is a negative raise. Or, rather, you could choose to deal with it that way. There are others.

What I laid out was not meant to be the final word on salary adjustments. The point was this: Any time you use a mutator, it can be rewritten as a series of methods based on business rules instead of fiddilng with internals.

More importantly, and this is something everyone in this and related threads is missnig - Every single technique mentioned is valid. TMTOWTDI, for crying out loud. Maybe type-based validation is appropriate here and maybe it needs value-based validation there. Maybe a mixture of both plus other techniques is valid in this other place.

Maybe mutators are better used in area A and maybe business-rule-based methods are better in area B. My argument is that mutators can be wholly replaced with business-rule-based methods. I'm not saying that you should do that in every case - that would be cargo-cult stupidity.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.


In reply to Re^19: Assignable Subroutines by dragonchild
in thread Assignable Subroutines by dragonchild

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.