mrHoft / LootManager

MIT License
0 stars 1 forks source link

Cleanup code Syntax #8

Closed token419 closed 5 years ago

token419 commented 5 years ago

Cleanup code syntax according to http://lua-users.org/wiki/LuaStyleGuide

token419 commented 5 years ago

Created 72ad277 to address this.

Can close once the pull is merged.

mrHoft commented 5 years ago

I'm using Notepad++ it helpes to make more compact code. I hate useless spaces such "a + b" instead "a+b". It is my individual fad )) Using 6 spaced in tab.

token419 commented 5 years ago

Ah for sure, my cleanup was to make the code more readable and workable, Without spaces it makes certain things more easy to miss when glancing over the code. Things like multiple variables mixed in with function calls that use the . notation, its easy to read it as one long function call, or as multiple variables, when indeed it is a mixture of both. It also makes math equations more easy to identify and to identify where concatenation is happening.

Regarding spaces vs tabs, its better to convert tabs to spaces generally, Usually people use a 2 or 4 space indentation, I went with 2 since that was the LUA standard. I really don't care much just as long as it's consistent :p It's easy enough for me to change in my editors.

I use a combination of Sublime Text 3 and Microsoft Visual Studio code and VIM myself, depending on what i'm doing. I haven't given Notepad++ a try in several years, awhile back they had malware in their installer and I moved off it and haven't ever tried it since.

token419 commented 5 years ago

If we need to, i can rebase and re submit the pull requests without the syntax cleanup.

mrHoft commented 5 years ago

"readable and workable" readable - not for me workable - what? no matter for machine! spaces enlarges file size and text size. i like to see and understand all code by one sight.

token419 commented 5 years ago

I'll close this one out since its subjective :)