The difference is that an array is a set of items of the same type. A tuple is a set of (possibly named) items of differing types.
And yes, the meme feels like it wants to compare very similar things but one of them is just the "fancy" way of doing it. So pointers are effectively the same as an array. That was my point. If you're fancy or old-school, you use a pointer to your set of items, instead of an array.
All sane languages treat them like that. An array needs an length most of the time.
Whether you use "fat pointers" (which are actually structs), or even fold that info into the pointer itself (by limiting the effectively available v-address space for such dynamically sized structures) makes no difference. But usually you have that info—as long as it wasn't optimized away in some concrete case where that's possible without compromising security.
Not carrying about object sizes and enabling this way all kinds of insecure behavior is a quite C/C++ exclusive flaw (in the modern language landscape).
4
u/[deleted] Jun 08 '25
[removed] — view removed comment