Arrays with blocks get painful when you put arrays into arrays into arrays. Basically and kind of complex data structure since all we have are arrays. First you get these errors:
That helps because now Static TypeScript knows what is in that array. But then you get a bunch of other errors because the compiler is confused and the only thing to do is reload it. Give the compiler a fresh start. And now you get this:
I’ve wondered about this before. I’m not sure there’s a good way to represent multi-dimensional lists/arrays in block-based languages (I haven’t looked around to see what’s been explored).
It would certainly be possible to do something limited, like provide a block that creates only 2D, fixed-size arrays. It could look somewhat like the the show leds block, where each cell was the initial value. Accessors could be used to get or set a row/column.
In my mind, a need for multidimensional structures is a good motivation to move to a text-based language. I think use of blocks could be cumbersome.
Absolutely, I am pushing the language to the limit.
A few decades ago Microsoft came up with an idea they called “eat your own dog food.” What they did was as soon as software was usable they required the developers to use it. As a teacher who teaches MakeCode I use it myself as I prepare new potential lessons.
In a given class abilities are on a bell curve. I see this limitation as frustration for a few of my students but perhaps not most. Still, for those that can go farther MakeCode should allow it.
I understand that some limitations are going to be built-in to Static TypeScript as the language is named. I am thinking that a mode that allows the runtime to crash over protecting against type errors could be useful to the few.
So “I know what I am doing mode” could be to make some type errors warnings and let me turn off warnings.
Maybe some separate “number array” etc blocks could be useful in this situation, in addition to the normal array block. I’ve gotten this error and gone into JavaScript to specify the type, but it ended up breaking the whole project. I agree that this very annoying.