Hacker News new | past | comments | ask | show | jobs | submit login

I read your article before posting, and it says:

-----

void foo(char a[..])

meaning an array is passed as a so-called “fat pointer”, i.e. a pair consisting of a pointer to the start of the array, and a size_t of the array dimension.

-----

I didn't see a "current length" mentioned. Is it there? Can I have a string with an allocated length of 20 bytes and a current length of 10 bytes, without using a looking for a zero byte?




The capacity value is not part of it.

This proposal is not about memory management any more than 0 termination is about memory management. It is just about finding the end of the array.




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

Search: