08-29-2016 12:36 AM
Let me rephrase ‘expected output’ and ‘unexpected output’ as output 1 and output 2. Apparently both 1x0 and 0x0 arrays are empty arrays, so I assume these arrays to behave exactly same in any given instance. Since 1x0 and 0x0 empty arrays had different behavior i.e. output 1 and output 2 (irrespective of which is right/expected) in the discussed example, I considered it has a bug.
Necessarily, should I consider 0x0 and 1x0 empty arrays as two different instances of empty array and expect it to behave independently?
08-29-2016 12:43 AM
@sharath006 wrote:
Necessarily, should I consider 0x0 and 1x0 empty arrays as two different instances of empty array and expect it to behave independently?
Yes.
08-29-2016 02:20 AM
It seems confusing, but i think it's helpful to think of a Nx0 or 0xN array as an Array of Empty, instead of an Empty Array. The Empty Array primitive checks if some dimension is 0, but just like Inf /= Inf sometimes two empty arrays can be different.
/Y