3 ms·
Yes, that's a jagged/ragged/array-of-array, and most languages support them. There isn't a requirement for the arrays to be the same length. There are many ar
by dm319 6y ago
Yes, that's a jagged/ragged/array-of-array, and most languages support them. There isn't a requirement for the arrays to be the same length. There are many arguments about the pros and cons of each, and how different they are the closer to assembly you get. Golang had a proposition to include multidimensional arrays [1], there were lots of arguments. I think the different perspectives depend on what you want to use it for and how much numerical processing you do.
[1] https://github.com/golang/go/issues/6282 https://github.com/golang/go/issues/6282
- ironmagma 6y agoAccording to this thread, it is not a true jagged array because each row has the same number of columns and each column the same number of rows. You can initialize it as a jagged array but it will still allocate it like a matrix. https://stackoverflow.com/questions/1083658/do-jagged-arrays-exist-in-c-c https://stackoverflow.com/questions/1083658/do-jagged-arrays... > the array will still have the shape [2][3]. If you want a true jagged array, you will have to create it dynamically.
- dm319 6y agoAh ok, I was discriminating between a true multidimensional array and array-of-array (which can be ragged).