Re:C’s Biggest Mistake (2009)
by torstenvl on Saturday September 12, 2020 @07:48PM
(#24456929)
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.
[ Parent
| on HN ]
Re:C’s Biggest Mistake (2009)
by SV_BubbleTime on Saturday September 12, 2020 @08:06PM
(#24457024)
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?