News for hackers. Stuff that matters.
Re:The Descent to C (2013) by Zababa on Friday September 03, 2021 @06:30PM (#28410135)
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.
Re:The Descent to C (2013) by kevin_thibedeau on Friday September 03, 2021 @10:20PM (#28411512)
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).
Re:The Descent to C (2013) by sn41 on Friday September 03, 2021 @10:29PM (#28411572)
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.
Re:The Descent to C (2013) by omegalulw on Friday September 03, 2021 @08:10PM (#28410869)
"Because real programmers only need void*".
Re:The Descent to C (2013) by Zababa on Saturday September 04, 2021 @05:51AM (#28413629)
There's a language for that https://github.com/kyouko-taiga/void-lang