dot notation versus semicolon.

Mar 4, 2009 at 7:29 AM

Though i have programmed in various languages, i am new to LUA.  I noticed your ide supports the "." notation when referencing methods in addition to the ":".  Is that by design and specific to this ide or does LUA support that also?




seems to work the same as :


Mar 9, 2009 at 5:43 PM
Lua can be a bit confusing for new developers, but there is a Lua language reference on the Web that goes through all of the language semantics - Note that there are some changes as libraries that do things like File I/O are not included in the Wow Lua script compiler.

To your question, both notations are technically correct although IntelliSense should provide different semantics based on dot "." versus colon ":"

From the Lua reference, section 2.5.8
A call v:name(args) is syntactic sugar for,args), except that v is evaluated only once.

Hope this helps,