Originally Posted by Nikita S. Doroshenko
But even when i see Blizzard's code (who could think, it's one of the top game company in a world, and most known company), and their interface code looks messy in some files, and style of code different, and looks like that they don't even have a code standard, I find this very strange.
|
Don't use Blizzard's code as an example of anything other than basic API usage (eg. what values are returned by what functions). It is indeed messy and inconsistent, and often is not just stylistically bad, but functionally bad as well. It's full of unnecessary globals, excess table and function creations, and other unsavory habits. There are also plenty of examples to be found in there of code written by someone who clearly was not familiar with Lua at all... this is my all-time favorite right here:
https://www.townlong-yak.com/framexm...arent.lua#3627
Whoever wrote that apparently did not know about string.upper.