ziggy-pydust icon indicating copy to clipboard operation
ziggy-pydust copied to clipboard

Zig tracking issue

Open gatesn opened this issue 2 years ago • 0 comments

Our wish list for the upstream Zig project!

See https://github.com/ziglang/zig/wiki/Third-Party-Tracking-Issues-(what-is-important-to-other-people%3F) for similar issues from other projects.

For Loop Array Construction

This would be a really nice shorthand for a lot of our comptime work.

const foo: [10]X = blk: {
    const foo_: [10]X = undefined;
    for (0..10) |i| {
      foo_[i] = x(i);
    }
};

// Becomes
const foo: [10]X = for(0..10) |i| x(i);

gatesn avatar Sep 18 '23 12:09 gatesn