News for hackers. Stuff that matters.
Re:Making a 3D modeler in C in a week by SJC_Hacker on Friday May 03, 2024 @11:37AM (#40248905)
> Arrays in C have length information.

Not in any sense that is actually useful to the programmer, at runtime at least. You cannot ask an array how big it is.

Pointers actually do have length information as well, otherwise free() would not work. But its the same deal with arrays - there is no way to access it outside of compile time constants, if those are even present.

Re:Making a 3D modeler in C in a week by jstimpfle on Saturday May 04, 2024 @05:15AM (#40256115)
Not every pointer works with free(). Most don't.