Comment by unwind
15 hours ago
I think this is an interesting change, even though I (as someone who has loved C for 30+ years and use it daily in a professional capacity) don't immediately see a lot of use-cases I'm sure they can be found as the author demonstrates. Cool, and a good post!
Combined with C23's auto (see vec_for) you can technically backport the entirety of C++'s STL (of course with skeeto's limitation in his last paragraph in mind). gcc -std=c23. It is a _very_ useful feature for even the mundane, like resizable arrays:
What I don't quite get is why they didn't go all the way in and basically enabled full fledged structural typing for anonymous structs.
That way my plan, but the committee had concerns about type safety.
1 reply →