Variable names inconsistency

The way that variables are sorted in snap! is different depending on where you are trying to select them from. For example if you are trying to select a variable in a set or change block, you will get the variables from oldest to newest going down:


This is different than the behavior in the pallet where they are sorted alphabetically:


My request would be to have these be sorted in the same way, so you don't have to search for the name of the variable you want to use after just putting in a reporter from the pallet. I find the alphabetical sorting to be very helpful, especially when creating similarly named variables, but I can see that there are reasons to sort it the other way as well.

There's a subtle reason for the different ordering: The setter block's dropdown menu is context sensitive (!), i.e. it displays all the variables which are reachable at the block's current position, in other words, it traverses the block's lexical scope. The lexical scope can have (many more) variables that aren't shown in the palette, for example local script variables, formal ring parameters, custom block instance variables etc. Ordering these alphabetically would be possible but it would also the counterproductive wrt the idea of lexical scope.

Oh, that's.. actually super interesting