Replies: 2 comments
-
Not sure if this is the official (or the complete) reason but using Also, personally not a fan of |
Beta Was this translation helpful? Give feedback.
-
We won't go with local-by-default, as it can produce very subtle bugs when people make mistakes reusing the same name in different nested scopes. Teal already disallows global-by-default, and we're about to close the final gap in that discussion with #543. So, basically, both locals and globals need to be declared explicitly. |
Beta Was this translation helpful? Give feedback.
-
why not use local scope as default, and using some keyword to defining global vars/fuction, like:
that will produce clean code then writing local keyword many time.
Beta Was this translation helpful? Give feedback.
All reactions