TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Futureproof: A shader editor in Zig, WebGPU, and Neovim

10 点作者 mkeeter超过 4 年前

1 comment

dnautics超过 4 年前
two things I loved about this article:<p>1.<p>&gt; 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.<p>2. I think OP&#x27;s point about comptime being TOO powerful is potentially true. It might be manageable by creating cultural &quot;best practices&quot;, and maybe even labelling them as such. For example in zig stdlib, std.Mutex is, to my eyes, an &quot;interface&quot; pattern and std.Allocator is a &quot;factory&quot; pattern. Rules-of-thumb for when you want to use which pattern and solid examples would probably help greatly.