Hacker News new | past | comments | ask | show | jobs | submit login

I'm glad I read the last line, for those who may not have gotten that far: this is about to become a much less prevalent pattern in Zig code, replaced with declaration literals. The new syntax will look like this:

   var gpa: std.mem.GeneralPurposeAllocator(.{}) = .init;
Which finds the declaration literal `std.mem.GeneralPurposeAllocator.init`, a pre-declared instance of the GPA with the correct starting configuration.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: