Hacker News new | past | comments | ask | show | jobs | submit login
Futureproof: A shader editor in Zig, WebGPU, and Neovim (mattkeeter.com)
10 points by mkeeter on Dec 29, 2020 | hide | past | favorite | 1 comment



two things I loved about this article:

1.

> The general-purpose allocator, which can print memory leaks on program exit. This is like running in Valgrind all the time, and makes writing leak-free code part of normal development.

2. I think OP's point about comptime being TOO powerful is potentially true. It might be manageable by creating cultural "best practices", and maybe even labelling them as such. For example in zig stdlib, std.Mutex is, to my eyes, an "interface" pattern and std.Allocator is a "factory" pattern. Rules-of-thumb for when you want to use which pattern and solid examples would probably help greatly.




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

Search: