News for hackers. Stuff that matters.
Re:C23 is finished: Here is what is on the menu by rando14775 on Friday August 05, 2022 @11:48AM (#32357836)
When will they add a slice (fat pointer) type? I.e. a generic version of

> struct T_slice { T* ptr; size_t len; };

with all the syntactic sugar and bounds checks added in. This could catch so many out of bounds issues and doesn't seem that hard to do.

Re:C23 is finished: Here is what is on the menu by axus on Friday August 05, 2022 @12:38PM (#32358515)
The author listed "wide pointers" in the second paragraph of things they are impatient for, and would like a faster release cycle for. It sounds like it could be another 10 years.
Re:C23 is finished: Here is what is on the menu by __phantomderp on Friday August 05, 2022 @02:37PM (#32360108)
The original authors of the language also advocated for this, and Walter Bright's D compiler has a BetterC compiler that also includes a

int arr[..];

syntax for such things. But, our plates are full and the proposal wasn't written: it'll be up for next release, for sure, and it's one of the many things I would like to put in the language.