title: Lua Semicolon Conventions
body: <p>I was wondering if there is a general convention for the usage of semicolons in Lua, and if so, where/why should I use them? I come from a programming background, so ending statements with a semicolon seems intuitively correct. However I was concerned as to why they are <code>"optional"</code> when its generally accepted that semicolons end statements in other programming languages. Perhaps there is some benefit?</p>
  
  <p>For example: From the <a href="http://www.lua.org/pil/1.1.html" rel="noreferrer">lua programming guide</a>, these are all acceptable, equivalent, and syntactically accurate:</p>
  
  <pre><code>a = 1
  b = a*2
  
  a = 1;
  b = a*2;
  
  a = 1 ; b = a*2
  
  a = 1   b = a*2    -- ugly, but valid
  </code></pre>
  
  <p>The author also mentions: <code>Usually, I use semicolons only to separate two or more statements written in the same line, but this is just a convention.</code>  </p>
  
  <p>Is this generally accepted by the Lua community, or is there another way that is preferred by most? Or is it as simple as my personal preference?</p>