I'm wondering if some time and effort could be found into making it a bit easier on my poor wrist/fingers/brain when editing a large and complex project
I have a lot of variables and to get down to the variable category blocks takes a bit of scrolling.
My suggestion for helping with this is be able to hide/unhide the variables
ill try to see what i can do. my advice is try key : value lists, which you can nest / group.
i do agree though, i try to avoid global variables if i can because it just gets crowded and disorganized. it would be nice to have more control over what shows up where.
heres a project with the associative arrays ive been using alot lately. thats been my go to method of organizing properties and such. you can ignore the js block in the first definition, and dont worry i left the dropdown menus alone. so instead of showing a list of keys for the list, it shows nothing. dont know how else to do it in normal snap. im sure youll figure it out, good luck.
If you are annoyed by this, the make variabels library in snap has a operator that allows you to type a variable name as text, you can put it inside the set [varname]
His reasoning is that when people use it, they're trying to turn Snap! into a text language like whatever they learned previously. When you find yourself with a lot of global variables (or even a lot of local ones!) you should probably build a dictionary instead (a list of key-value pairs) instead. Then you just have one variable.
This is especially true when the variables are related to each other. For example, if you have a bunch of variables named RED, ORANGE, YELLOW and so on, with RGB vectors as their values, they should clearly become one variable COLORS with a dictionary as its value. Besides reducing clutter, this would allow you to add colors to the list, such as MAROON or TEAL, without having to change your code.
I see his point (not to the degree that I hate the create-var library, on the contrary, I find it super useful sometimes)- it's much easier to just use one variable like a table then n other variables. Anyway.