lua-users home
lua-l archive

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


Is it possible to automaticaly translate a . To : for function calling?
I know they do something different, but i do not like the use of two
different chars for what for the end user apears to be the same thing. I
cannot explain to them why setting a var requires a . and calling a function
requires a :
It is easier for them if they can use a . in both cases. See below:

Classvar:function()

Is the same as calling

Classvar.function1(Classvar)

Is there a way to tell lua to make it possible to use:

Classvar.function1()

And still do:

Classvar.function1(Classvar)