View Single Post
05/19/14, 03:40 AM   #2
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
Hey,
I do like to use getters and setters while writing code in objective launguages which offer some kind of encapsulation. But I don't use them in lua because I think it's just a syntax sugar and accessing a variable directly is faster than calling a function. In launguages such as c++ compiler can optimize such functions calls but in lua the function is called every time so it costs more. But that is just my opinion
  Reply With Quote