In my experience code review is only a valid experience under one of two catagories.
- The review refers to a defacto standard that has not been adhered to
- The review offers at least basic reasoning behind a decision.
Neither apears to have occured in this case.
There are very few central core truths to programming. The rest are interpritation and implimentation, specifically of the core truthes. In my experience:
- code should be as simple as it needs to be be and no more so.
- code should be as efficient as it needs to be and no more so.
- code should be as readable as it needs to be and no more so.
- code should be as reliable as it needs to and no more so.
- code should fulfil its technical design brief.
In my opinion all coding standards come from these. The question I would be asking is not what do other people do, because other people often know no better than you (or I) I would ask what core principle does 'not using shift' fulfil. Does it make code faster, simpler, more reliable? However as all decisions are a trade off I would ask myself do I need whatever advantage and can I accept the disadvantages that it would also bring.
On balance looking at the list I have given above to shift or not to shift. It dont matter one wit, tiss simply a matter of style, style being something that too frequenly is mixed up with a coding standard. Where do those brackets go again?
--
Zigster
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|