4 ms·
This is actually a really good way to drive home that arrays don't really "exists" in C and are just syntaxic sugar for pointer arithmetic.
by Zababa 5y ago
This is actually a really good way to drive home that arrays don't really "exists" in C and are just syntaxic sugar for pointer arithmetic.
- omegalulw 5y ago"Because real programmers only need void*".
- Zababa 5y agoThere's a language for that https://github.com/kyouko-taiga/void-lang https://github.com/kyouko-taiga/void-lang
- kevin_thibedeau 5y agoThey exist in the sense that their length is sometimes known if the full definition is visible. sizeof(array) isn't the same as sizeof(generic ptr to array).
- sn41 5y agoThis is not entirely a complete view. For example, sizeof() operator returns the declared size of an array. It seems that C recognizes the concept of an array.