Hi, I have a crazy idea. Sometimes you have an array of structs, and want to see which elements of the array have a certain flag set, or something more complex, like which elements of your array of rectangles have an area greater than 30. When that happens, you have to mentally calculate the area for each element, and if the struct has enough variables, you often have to expand each struct manually... So, my proposal is that you could use the syntax in the following examples in the Name part of the Watch window:
This name would expand to a list of 16 items (shown like an array of 16 elements), and show the result on the value side of each item.
rectArray[__index].width*rectArray[__index].height > 30, numRects
This would display true or false (1 or 0) on the Value column for each item.
__index would be a pseudo variable that would become the number of the index at each iteration, from 0 to num_elements-1. On the back-end, this could simply be equivalent to copy-pasting your expression many times with a different __index constant...
Matrices could easily support this, too, since they're just arrays. If you wanted to visualize the addition of two matrices together, you'd do:
matrix1[__index] + matrix2[__index], mtx
I also see how accepting this idea might feel like the entrance to a rabbit-hole of features to add more power to these kind of expressions, like "Oh, I wana do this loop thing but I have a linked list instead of an array, so can we, like, add a way to define and call functions and allow recursion and stuff?". That's too much. (Actually, the main thing you'd need for this is "just" need the ability to declare and set custom pseudo variables, but to me it wouldn't be worth the complexity). But just the simple loop seems reasonable. It doesn't even require much new syntax since it looks like the normal array syntax, and I feel like it would be very useful and cool.
Let me know what you guys think about this.