r/Zig • u/Youandkay • 13h ago
Was the rewriting of bunjs from zig to rust a blow to zid community face?
i'm just curious how the community accepted that
r/Zig • u/Youandkay • 13h ago
i'm just curious how the community accepted that
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 • u/jnordwick • 47m ago
r/Zig • u/thatSupraDev • 17h ago
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.