Comment

Comment by disattention

This is a common pattern in zig and compliments comptime well. It's not supposed to be the constructor for the ArrayList, it's more like a C++ template in that you're constructing a type that then needs to be initialized. There isn't templating syntax in zig though, since you just write compile time code in zig directly (which is really nice).

Also, the type is different and ZLS will insert the hint if enabled.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton