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
{{ message }}
Repository navigation
Change instance variable numbers for line numbers instead of counter #132
Whenever we are creating a new instance of a variable or a fresh one, we keep the variable name and concatenate it with an incremental counter (e.g., a0, x1, y2).
A simple change would be to use the line number where this value was introduced, instead of the counter.
Example:
The error could be #x_25 == #x_24 - 10 where 24 and 25 are the lines where these were introduced.
A question could be, if multiple vars are changed could we still use the same tactic? Lets try and make some tests to see.
Ideally the UI should hide the numbers (using colors, maybe?) and refer to the definition location (with the same color).
But for now, having numbers is good. But what if you are calling a function with a parameter x also defined in the line 22 (but another file)? Are there any chances of collisions?
But what if you are calling a function with a parameter x also defined in the line 22 (but another file)? Are there any chances of collisions?
For instances of local variables this should be okay since we have different scopes and the context is not shared between them. Now, for fields this could be an issue yes
Activity
alcides commentedon Dec 10, 2025
Ideally the UI should hide the numbers (using colors, maybe?) and refer to the definition location (with the same color).
But for now, having numbers is good. But what if you are calling a function with a parameter x also defined in the line 22 (but another file)? Are there any chances of collisions?
CatarinaGamboa commentedon Dec 10, 2025
For instances of local variables this should be okay since we have different scopes and the context is not shared between them. Now, for fields this could be an issue yes