We are considering a new feature, and want your input!
What’s the feature?
What is it?
The ability to create a variable and define a local ‘scope’ for it. Meaning, it will be usable only for specific blocks of code that you define.
How can you use it?
Say you wanted to make a bunch of variables, but each one was only needed for 1 function. Instead of cluttering up your variables menu with a ton of global variables, you could make 1 local variable per function - and that variable would be the only one that showed up in your ‘Local’ variables menu when you were editing that function/specific object.
Local variables will also make it easier to share snippets of code in the future - say, to a global Hopscotch code library, should such a feature exist…but more on that later.
Here is how it would look like
Questions for you
- Does the concept of local variables make sense to you?
- What questions do you have about how it would work?
- How would you use local variables in Hopscotch today?
- What do you think local variables would allow you to make in Hopscotch that you haven’t been able to make before?