On Mon, Oct 10, 2016 at 11:06 PM, Rena <hyperhacker@gmail.com> wrote:On Mon, Oct 10, 2016 at 3:52 PM, Igor Ehrlich <iehrlich@iponweb.net> wrote:And, overuse of brackets...At this point I got really curious. Could you please be more precise?I guess technically you don't need the brackets in statements like:if (depth == 0) {luasdorintf("%-5i | ", stackIndex);} else {luasdorintf(" ", stackIndex);}It could be written like:if (depth == 0)luasdorintf("%-5i | ", stackIndex);elseluasdorintf(" ", stackIndex);but IMO this is a stylistic choice, and I usually prefer the former, as itprevents mistakes like:if (depth == 0)luasdorintf("%-5i | ", stackIndex);elseluasdorintf(" ", stackIndex);do_another_thing(); //oops, not conditionalAnyway, bikeshedding aside, it's been pointed out on this list before that"public domain" isn't legally recognized in some parts of the world, andyou're better to use something like the MIT License (that Lua uses itself)which gives the same effect without any potential hassle for those who wantto use it.--Sent from my Game Boy.
+1 for not omitting { and } in one-line if and else.
--
Best regards,
Boris Nagaev