@LoopSpace Lua can be very verbose and this can lead to very long sized code, which essentially does not much (other than stealing space and file size). Therefor I try to minimize code whenever I can (but only if it makes sense). As a result have advantages and disadvantages alike:
- + short, precise code (not an essay)
- + cleaner syntax/structure
- + smaller file size
- + easier to maintain things (search/change/override)
- + satisfaction for being a 'genius', because its cool to find clever solutions/notations :D
- - code may get (unnecessary) complicated
Advantages are predominant, but you have to be kind of balanced. As rules of thumb I try:
- to make thing work with as less code as possible.
- to use 'local' variables as much as possible.
- describe complicated processes with easy to understand algorithms.
And while all this are nice coding-style optimizations, is actually comes down to one thing: ‘If it looks right - it is right!’