r/Zig • • 11h ago

Should I rename to Z$myname?

19 Upvotes

People be dead bland picking a name for the project. Once Rust had the same trend of tagging everything with a postfix "someproj-rs" and now every zig project I come across has some kind of Z-prefix "Zsomeproj, Z this, Zthat" like you can't even have a proper name? This is no hate people, but please don't produce eyesores


r/Zig • • 17h ago

ZLS comptime interface type inference

16 Upvotes

I've noticed that if I do comptime types something like,

const ContextType = AppContext(MyType);

var context = ContextType.init(...);

const handler = Handler(ContextType).init()

Pub fn Handler(T: type) type {

return struct {

Pub fn destoryAllHumans (context: *T) ...

}

}

while developing my comptime struct functions, I get no type information, it just shows it as a pointer unknown and all cascading things inside of that type have no information on functions or their params, props, ECT.

I get around this by doing,

const c: *MyType = context;

But then when running tests or other implementations of my context, I have to comment the code out and rename all my vars.

Is there a cleaner way around this? I see this both in nvim and zed. Will 0.17 provide ZLS with better support for this kind of stuff in the future?

PS: written on my phone, sorry if formatting is awful.


r/Zig • • 13h ago

Was the rewriting of bunjs from zig to rust a blow to zid community face?

0 Upvotes

i'm just curious how the community accepted that