The reason for the advice should be mentioned. Best practices exist because of real world issues that have come up again and again. In this case, the reason for the single-char class is because of changing requirements when using regexes as a parsing tool. The other regex best practices fall under the same category. If your regex changes so that now both : and ; are delimiters, then a single-char class is easier to maintain with a lower chance of error.

That's all best practices are - things that reduce your chance of error when changing code. It's no different than the C best practices that go into changing

if ( foo == 5 ) call_function( foo );
into
if ( 5 == foo ) { call_function( foo ); }
Not much of a difference at first glance, but those "minor changes" took thousands of man-hours to coalesce and we ignore them at our peril. Don't blindly accept, but look deeper before suggesting a rejection.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

In reply to Re: The cost of unchecked best practices by dragonchild
in thread The cost of unchecked best practices by moritz

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.