As a person with a huge expirience i can just tell you the next: GUI code has 3 great problems. 1 - it has fixed facility. 2 - it is for TWO times slower and has leaks. 3 - it is too slow to create an spell on GUI.
Coding on jass gives you ability to create your own functions, and overall decrease a mapsize, prevent your code from leaks and bugs (cause this thing you shown cause a bug), and use the full potential of a warcraft3 engine.