You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, in Discord, we discussed the possibility of TSTL taking extra steps to handle the case of a TSTL program with over 200 local variables.
Right now, it sounds like Perry just wants to keep things as is, given that there are tradeoffs with either option.
However, everyone can agree that run-time errors are terrible - the whole point of using TSTL in the first place is to stop run-time errors. With that in mind, can we make TSTL keep a counter of the current scope's local variables, and then refuse to compile (or throw a warning) if the counter reaches 200? (Or maybe even 190, to be a little on the safe side.)
This would give the end-user the chance to refactor their program long before running into any issues in production!
The text was updated successfully, but these errors were encountered:
What should the threshold be? Is it the same for every lua target/version?
I guess we would also have to be able to disable it in case there is some weird patched target.
Today, in Discord, we discussed the possibility of TSTL taking extra steps to handle the case of a TSTL program with over 200 local variables.
Right now, it sounds like Perry just wants to keep things as is, given that there are tradeoffs with either option.
However, everyone can agree that run-time errors are terrible - the whole point of using TSTL in the first place is to stop run-time errors. With that in mind, can we make TSTL keep a counter of the current scope's local variables, and then refuse to compile (or throw a warning) if the counter reaches 200? (Or maybe even 190, to be a little on the safe side.)
This would give the end-user the chance to refactor their program long before running into any issues in production!
The text was updated successfully, but these errors were encountered: