Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


They 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).


This 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.


"Because real programmers only need void*".


There's a language for that https://github.com/kyouko-taiga/void-lang




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: