| ▲ | socalgal2 5 hours ago | |
The `echo` part seemed interesting but it made me think, debuggers need this as a built in feature. If I have
It seems like it should be a common feature to be able to view between each array operation in a debugger without having to augment the code with `echo`The out of bounds handling didn't seem all that good to me. Sure you can filter out undefined. You could also just make a function that returns an empty array if out of bounds, or array of 1 element if not.
I also find grids made of 2 dimensional array to be code small. An array of arrays is NOT A GRID as there is nothing enforcing the inner arrays to be the same length as each other. Also, in efficienct code it would be better to provide a 1 dimensional array and bounds. Now, out of bounds checks based on accessing outside the array won't work. You need to check actual bounds. Again giving preference using a helper | ||