top | item 40994718

(no title)

disattention | 1 year ago

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.

discuss

order

No comments yet.