title: Should parameters be used as variables in Lua?
body: <p>I've been told in Java that I should avoid modifying the original parameters such as</p>
  
  <pre><code>public int doStuff(int begin, int end) {
    /* loop or something */
    begin++; //bad
    end--; //also bad
    /* end loop */
    return
  }
  </code></pre>
  
  <p>instead, I should do something like</p>
  
  <pre><code>public int doStuff(int begin, int end) {
    int myBegin = begin; //something like this
    int myEnd = end;
    /* stuff */
    return
  }
  </code></pre>
  
  <p>So, I've been doing this in lua</p>
  
  <pre><code>function do_stuff(begin, last)
    local my_begin = begin
    local my_last = last
    --stuff
    my_begin = my_begin + 1
    my_last = my_last - 1
    --stuff
  end
  </code></pre>
  
  <p>But, I'm wondering if</p>
  
  <pre><code>function do_stuff(begin, last)
    --stuff
    begin = begin + 1
    last = last - 1
    --stuff
  end
  </code></pre>
  
  <p>is also discouraged, or is it nice and concise?</p>