Originally Posted by
chrissstrahl
The brackets make a big difference in the readability of the code, and there for not unnecessary at all.
They are unnecessary. Your statement is based in your experience with a specific text editor, Notepad++. And is not directly related to morpheus script itself.
In Morpheus you can do:
// THIS:
main:
...
end;
// THIS:
main:{
...
}end;
// OR THIS:
main:{{{
...
}}}end;
And it will make no difference in the execution of the code. So, why the need of adding the brackets?
That is something directly related to Notepad++ behavior only.
Also, in modern text editors, like Sublime, Atom or Visual Studio the tab/space indentation is detected as code blocks, so you can do this:
Originally Posted by
chrissstrahl
Well, the go to thing is a endless Argument, I think it invites to much troubles and a unclean coding style.
With goto, instead of doing this:
Code:
thread <label> local.arg1 local.arg2 local.arg3 local.arg4...
end
you can just use "goto <label>" to jump to another label without the need of passing the arguments
I don't see how that can cause troubles or make a code unclean
I mean, if you know how to use it, you will never have problems, and if you don't, then you should keep learning.
Originally Posted by
chrissstrahl
You have to keep in mind that not everyone reading that document has been coding for years and knows how to safely use go to.
IMO that's not a valid reason to say "do not use goto". Pass over some concepts in a scripting guide just because you don't like or understand it, is not a good thing. You should teach (properly) and let the user decide whether to use it or not.