I recently was reminded of using var: type
to declare variables.
I asked my colleague who’s a bit more vetted in lua and its various workings than myself, and he came up with the following:
"It's so you can't set a var to a different type in the syntax checker"
However, when I tried to preview this suggested behaviour in studio’s script editor, it didn’t give me any flak for setting a
declared as a: number
to true
.
Anyone got any ideas on its actual use case along with some (dis)advantages of using it?