Your proposal is a good addition, but we need scope on file, section, and instance level.
Section prevents everything breaking when you move things between files, but it doesn’t address the component-level issue. Let’s say you make a counter component like this:
( - 0 + )
Each instance needs its own copy of the component’s counter number variable or it breaks. If I make a screen with four separate counters on it, I need to manually make four number variables and wire them all separately. It’s extremely messy and inefficient.
The ideal solution is to expose component properties to the logic system. The only needed change is to allow one boolean property to be used in multiple places in a component with positive and negative checks (show if logged in vs. show if not logged in).
As a side-effect, this would make variable organization much simpler.
I want to have several instances of a component, each with their own separate variable instance values so I can manage logic and state for each instance independently of each other.