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

So... don't use array syntax in the function prototype and definition? The proposal doesn't PROHIBIT passing a pointer, it would just offer an option to pass a fat array.


I think you mean fat pointer. And yea, that’s nice for people that don’t care their 4bit array has 64bits of native type reserved... I think other people would care.

So, I go back to the idea that it seems unlikely this would ever be an official C change.


I think you and I are talking past one another.

Currently, f(a[]) with declaration void f(int a[]) passes a pointer to the first element, with no additional overhead.

Under the proposal, f(a[]) with declaration void f(int a[]) passes a pointer to the first element, with no additional overhead.

Help me understand why "other people would care"? What is the negative impact on someone who would not use the a[..] functionality?




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

Search: