05-11-2015, 04:56 AM
(05-10-2015, 04:22 PM)xoft Wrote: The dot is there for historical reasons, static functions used the dot-binding before we decided to use the colon-binding for all functions.
As for Lua, the colon means that an invisible "self" parameter is passed to the function as its first parameter, so these two are equivalent:
object:SomeFunction(param) object.SomeFunction(object, param)
Alright, yeah, I know how the OOP stuff works with the self parameter. I was just confused on why you would have a .bind and :bind. While we are on the subject with API design, why does the API have a c in front of every object? cBlockArea, CPluginManager, why not just PluginManager and BlockArea?