Hacker News new | ask | show | jobs
by uecker 384 days ago
Let's see. We have a relatively concrete plan to add dependent structure types to C2Y: struct foo { size_t n; char (buf)[.n]; };

Once we have this, the wide pointer could just be introduced as syntactic sugar for this. char (buf)[:] = ..

Personally, I would want the dependent structure type first as it is more powerful and low-level with no need to decide on a new ABI.

2 comments

This feels like such a massive overkill complexity-wise for something so basic.
Why do you think so? The wide pointers are syntactic sugar on top of it, so from an implementation point of view not really simpler.
Thanks, interesting to see how it will turn out.