Originally Posted by Sharparam
IKeeping it separated in that way makes it more clear what code is yours and what code comes from default libraries, and can in some cases also make code more readable for an outside developer, they wouldn't have to check if the method someframe:SomeMethod() that is defined in file1.lua and used in file2.lua comes from the WoW Frame or a custom method in file1.lua.
|
But why are you giving your custom methods the same names as default methods in the first place? This is just as bad an idea as naming a table
table or naming a local function
tostring -- there's just no reason to do it. If you see a
SetScript method in a WoW addon, it should always be the
SetScript method that comes with the given object type, period, just like if you see a call to a function named
tostring it should be the Lua language function. Anything else is just confusing for no reason.