lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


For Lua programming I (also fascinated Lua novice since 1 year) I
would strongly recommend to use MS Visual Studio Code (this is free of
cost - do NOT mixup with Visual Studio, which is more for C++/C#
etc..., and NOT free of cost). (strangely this free Visual Studio Code
supports Lua MUCH better than Visual Studio - I do not really know why
MS did this for free... maybe to "kill / limit" Notepad++).

And install the free addon for Lua by Sumneco from the extension store
which you see in Visual Studio Code then... .(this is somehow
programmed in Lua, do not ask me how exactly this interacts with VS
Code... but at least very nice with full help info things and
autocompletion and ...  You will have to add the Lua dll to the
windows system folder... ).

And Visual Studio Code with this Sumneco then will have automatically
some requirements for your naming, which is quite useful I think (but
mainly only one: Global elements should start with large char, local
elements with small char).

Other proposal for "nice programming" is, that you initialize all
global variables before the start of the functions... .

On Fri, May 27, 2022 at 4:58 PM Duke Normandin <dukeofpurl@gmx.com> wrote:
>
> On Fri, 27 May 2022 16:04:56 +0200
> Hugo Musso Gualandi <hgualandi@inf.puc-rio.br> wrote:
>
> [snip]
>
> > What I do on my projects: if the file is a standalone script I
> > usually don't bother with creating a main function.  I the module
> > is intended to be used via require, I put the code inside an
> > exported function.   I don't want to have side effects when I
> > call require("mymodule").
>
> T